diff --git a/src/Config/ConfigManager.cs b/src/Config/ConfigManager.cs index 62c1be5..8c4a2b3 100644 --- a/src/Config/ConfigManager.cs +++ b/src/Config/ConfigManager.cs @@ -33,7 +33,6 @@ namespace UnityExplorer.Config public static ConfigElement Auto_Scale_UI; public static ConfigElement Reset_Camera_Transform; - public static ConfigElement Default_Freecam; public static ConfigElement Pause; public static ConfigElement Frameskip; public static ConfigElement Screenshot; @@ -61,6 +60,8 @@ namespace UnityExplorer.Config public static ConfigElement Reset_FOV; public static ConfigElement Toggle_Animations; + public static ConfigElement Default_Freecam; + // internal configs internal static InternalConfigHandler InternalHandler { get; private set; } internal static readonly Dictionary> PanelSaveData = new(); @@ -191,10 +192,6 @@ namespace UnityExplorer.Config "Reset the camera position and rotation between freecam sessions, so the freecam always starts from the gameplay position and rotation.", false); - Default_Freecam = new("Default Freecam mode", - "Default type of freecam selected on startup.", - FreeCamPanel.FreeCameraType.New); - Pause = new("Pause", "Toggle the pause of the game.", KeyCode.PageUp); @@ -300,6 +297,10 @@ namespace UnityExplorer.Config Toggle_Animations = new("Toggle NPC animations", "Toggle NPC animations as selected in the Animator panel.", KeyCode.Keypad0); + + Default_Freecam = new("Default Freecam mode", + "Default type of freecam selected on startup (gets automatically updated with the last type of camera used).", + FreeCamPanel.FreeCameraType.New); } } } diff --git a/src/UI/Panels/FreeCamPanel.cs b/src/UI/Panels/FreeCamPanel.cs index 658a884..eca01e2 100644 --- a/src/UI/Panels/FreeCamPanel.cs +++ b/src/UI/Panels/FreeCamPanel.cs @@ -408,6 +408,7 @@ namespace UnityExplorer.UI.Panels UIFactory.SetLayoutElement(CameraMode.gameObject, minWidth: 100, minHeight: 25); GameObject cameraTypeDropdownObj = UIFactory.CreateDropdown(CameraModeRow, "CameraType_Dropdown", out cameraTypeDropdown, null, 14, (idx) => { + ConfigManager.Default_Freecam.Value = (FreeCameraType)idx; if (inFreeCamMode) { EndFreecam(); BeginFreecam();