From a7038ec378f7357e4c0ac0d5f88a8e7c44586361 Mon Sep 17 00:00:00 2001 From: originalnicodr Date: Sat, 10 Feb 2024 16:15:15 -0300 Subject: [PATCH] Made the camera path arrows turn off every time we play or continue the path, without bringing them back if the path is paused or stopped, making its state in the UI more consistent. --- src/UI/Panels/CamPaths.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/UI/Panels/CamPaths.cs b/src/UI/Panels/CamPaths.cs index 6367958..6b0f9aa 100644 --- a/src/UI/Panels/CamPaths.cs +++ b/src/UI/Panels/CamPaths.cs @@ -331,7 +331,7 @@ namespace UnityExplorer.UI.Panels UpdateCatmullRomMoverData(); GetCameraPathsManager().StartPath(); UIManager.ShowMenu = false; - if (pathVisualizer) pathVisualizer.SetActive(false); + visualizePathToggle.isOn = false; } if (unpauseOnPlay && UIManager.GetTimeScaleWidget().IsPaused()){ @@ -342,7 +342,7 @@ namespace UnityExplorer.UI.Panels void TogglePause_OnClick(){ if(GetCameraPathsManager()){ GetCameraPathsManager().TogglePause(); - if (pathVisualizer) pathVisualizer.SetActive(!GetCameraPathsManager().IsPaused()); + if (visualizePathToggle.isOn && GetCameraPathsManager().IsPaused()) visualizePathToggle.isOn = false; } EventSystemHelper.SetSelectedGameObject(null); @@ -351,7 +351,6 @@ namespace UnityExplorer.UI.Panels void Stop_OnClick(){ if (GetCameraPathsManager()){ GetCameraPathsManager().Stop(); - if (pathVisualizer) pathVisualizer.SetActive(true); } EventSystemHelper.SetSelectedGameObject(null);