mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-10 04:53:15 +08:00
Added a button to follow game objects with the freecam from the inspector window for more granularity when selecting the object to follow.
This commit is contained in:
@@ -18,6 +18,7 @@ namespace UnityExplorer.UI.Widgets
|
||||
int lastFlags;
|
||||
|
||||
ButtonRef ViewParentButton;
|
||||
ButtonRef FollowObjectButton;
|
||||
InputFieldRef PathInput;
|
||||
|
||||
InputFieldRef NameInput;
|
||||
@@ -289,6 +290,11 @@ namespace UnityExplorer.UI.Widgets
|
||||
UIFactory.SetLayoutElement(ViewParentButton.Component.gameObject, minHeight: 25, minWidth: 100);
|
||||
ViewParentButton.OnClick += OnViewParentClicked;
|
||||
|
||||
FollowObjectButton = UIFactory.CreateButton(firstRow, "FollowObjectButton", "Follow object with Freecam", new Color(0.2f, 0.2f, 0.2f));
|
||||
FollowObjectButton.ButtonText.fontSize = 13;
|
||||
UIFactory.SetLayoutElement(FollowObjectButton.Component.gameObject, minHeight: 25, minWidth: 100);
|
||||
FollowObjectButton.OnClick += () => FreeCamPanel.followObject = this.Target.gameObject;
|
||||
|
||||
this.PathInput = UIFactory.CreateInputField(firstRow, "PathInput", "...");
|
||||
PathInput.Component.textComponent.color = Color.grey;
|
||||
PathInput.Component.textComponent.fontSize = 14;
|
||||
|
||||
Reference in New Issue
Block a user