mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-11 01:48:07 +08:00
Changed the lights config button to only show the inspector with the lights properties, and added a new option for the default freecam (so to be able to use the gameplay camera if you can't interact with the menu).
This commit is contained in:
1 parent
180139dcd2
commit
463fec38b2
5 files changed
+20
-9
No files matched your search
@@ -276,9 +276,12 @@ namespace UnityExplorer.UI.Panels
|
||||
Quaternion arrowRot = lookaheadPoints[i].rotation;
|
||||
if (followObject != null && FreeCamPanel.followRotationToggle.isOn) arrowRot = followObject.transform.rotation * arrowRot;
|
||||
|
||||
// We could expose the color of the arrow to a setting
|
||||
GameObject arrow = ArrowGenerator.CreateArrow(arrowPos, arrowRot, Color.green);
|
||||
arrow.transform.SetParent(pathVisualizer.transform, true);
|
||||
try {
|
||||
// We could expose the color of the arrow to a setting
|
||||
GameObject arrow = ArrowGenerator.CreateArrow(arrowPos, arrowRot, Color.green);
|
||||
arrow.transform.SetParent(pathVisualizer.transform, true);
|
||||
}
|
||||
catch { ExplorerCore.LogWarning("Couldn't create campath visualizer."); }
|
||||
n = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace UnityExplorer.UI.Panels
|
||||
GameObject toggleObj = UIFactory.CreateToggle(ContentRoot, "UseGameCameraToggle", out useGameCameraToggle, out Text useGameCameraText);
|
||||
UIFactory.SetLayoutElement(toggleObj, minHeight: 25, flexibleWidth: 9999);
|
||||
useGameCameraToggle.onValueChanged.AddListener(OnUseGameCameraToggled);
|
||||
useGameCameraToggle.isOn = false;
|
||||
useGameCameraToggle.isOn = ConfigManager.Default_Gameplay_Freecam.Value;
|
||||
useGameCameraText.text = "Use Game Camera?";
|
||||
|
||||
AddSpacer(5);
|
||||
@@ -499,6 +499,7 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
void OnUseGameCameraToggled(bool value)
|
||||
{
|
||||
// TODO: Change the value on ConfigManager.Default_Gameplay_Freecam and save it
|
||||
EventSystemHelper.SetSelectedGameObject(null);
|
||||
|
||||
if (!inFreeCamMode)
|
||||
|
||||
@@ -158,9 +158,12 @@ namespace UnityExplorer.UI.Panels
|
||||
switch(requestedType){
|
||||
case LightType.Spot:
|
||||
lightComponent.range = 10;
|
||||
GameObject arrow = ArrowGenerator.CreateArrow(Vector3.zero, Quaternion.identity, lightComponent.color);
|
||||
arrow.SetActive(false);
|
||||
arrow.transform.SetParent(obj.transform, true);
|
||||
try {
|
||||
GameObject arrow = ArrowGenerator.CreateArrow(Vector3.zero, Quaternion.identity, lightComponent.color);
|
||||
arrow.SetActive(false);
|
||||
arrow.transform.SetParent(obj.transform, true);
|
||||
}
|
||||
catch { ExplorerCore.LogWarning("Couldn't create spotlight visualizer."); }
|
||||
break;
|
||||
case LightType.Point:
|
||||
GameObject sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
|
||||
|
||||
Reference in new issue
Block a user