mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2025-07-18 17:38:01 +08:00
Added option to reset the freecam transform between freecam sessions.
This commit is contained in:
@ -31,6 +31,7 @@ namespace UnityExplorer.Config
|
|||||||
public static ConfigElement<string> Reflection_Signature_Blacklist;
|
public static ConfigElement<string> Reflection_Signature_Blacklist;
|
||||||
public static ConfigElement<bool> Reflection_Hide_NativeInfoPtrs;
|
public static ConfigElement<bool> Reflection_Hide_NativeInfoPtrs;
|
||||||
public static ConfigElement<bool> Auto_Scale_UI;
|
public static ConfigElement<bool> Auto_Scale_UI;
|
||||||
|
public static ConfigElement<bool> Reset_Camera_Transform;
|
||||||
|
|
||||||
public static ConfigElement<FreeCamPanel.FreeCameraType> Default_Freecam;
|
public static ConfigElement<FreeCamPanel.FreeCameraType> Default_Freecam;
|
||||||
public static ConfigElement<KeyCode> Pause;
|
public static ConfigElement<KeyCode> Pause;
|
||||||
@ -185,6 +186,10 @@ namespace UnityExplorer.Config
|
|||||||
Auto_Scale_UI = new("Make the mod UI automatically scale with resolution",
|
Auto_Scale_UI = new("Make the mod UI automatically scale with resolution",
|
||||||
"Especially useful when running games in high resolutions and you are having a hard time reading the mods menu (requires restart).",
|
"Especially useful when running games in high resolutions and you are having a hard time reading the mods menu (requires restart).",
|
||||||
true);
|
true);
|
||||||
|
|
||||||
|
Reset_Camera_Transform = new("Reset Camera transform on freecam disable",
|
||||||
|
"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_Freecam = new("Default Freecam mode",
|
||||||
"Default type of freecam selected on startup.",
|
"Default type of freecam selected on startup.",
|
||||||
|
@ -26,6 +26,9 @@ namespace UnityExplorer.Loader.Standalone
|
|||||||
public bool Force_Unlock_Mouse = true;
|
public bool Force_Unlock_Mouse = true;
|
||||||
public KeyCode Force_Unlock_Toggle;
|
public KeyCode Force_Unlock_Toggle;
|
||||||
public bool Disable_EventSystem_Override;
|
public bool Disable_EventSystem_Override;
|
||||||
|
public bool Auto_Scale_UI;
|
||||||
|
public bool Reset_Camera_Transform;
|
||||||
|
public FreeCamPanel.FreeCameraType Default_Freecam;
|
||||||
|
|
||||||
public KeyCode Pause;
|
public KeyCode Pause;
|
||||||
public KeyCode Frameskip;
|
public KeyCode Frameskip;
|
||||||
@ -80,6 +83,9 @@ namespace UnityExplorer.Loader.Standalone
|
|||||||
ConfigManager.Force_Unlock_Mouse.Value = this.Force_Unlock_Mouse;
|
ConfigManager.Force_Unlock_Mouse.Value = this.Force_Unlock_Mouse;
|
||||||
ConfigManager.Force_Unlock_Toggle.Value = this.Force_Unlock_Toggle;
|
ConfigManager.Force_Unlock_Toggle.Value = this.Force_Unlock_Toggle;
|
||||||
ConfigManager.Disable_EventSystem_Override.Value = this.Disable_EventSystem_Override;
|
ConfigManager.Disable_EventSystem_Override.Value = this.Disable_EventSystem_Override;
|
||||||
|
ConfigManager.Auto_Scale_UI.Value = this.Auto_Scale_UI;
|
||||||
|
ConfigManager.Reset_Camera_Transform.Value = this.Reset_Camera_Transform;
|
||||||
|
ConfigManager.Default_Freecam.Value = this.Default_Freecam;
|
||||||
|
|
||||||
ConfigManager.Pause.Value = this.Pause;
|
ConfigManager.Pause.Value = this.Pause;
|
||||||
ConfigManager.Frameskip.Value = this.Frameskip;
|
ConfigManager.Frameskip.Value = this.Frameskip;
|
||||||
|
@ -243,7 +243,7 @@ namespace UnityExplorer.UI.Panels
|
|||||||
ourCamera.enabled = true;
|
ourCamera.enabled = true;
|
||||||
|
|
||||||
string currentScene = SceneManager.GetActiveScene().name;
|
string currentScene = SceneManager.GetActiveScene().name;
|
||||||
if (lastScene != currentScene){
|
if (lastScene != currentScene || ConfigManager.Reset_Camera_Transform.Value){
|
||||||
OnResetPosButtonClicked();
|
OnResetPosButtonClicked();
|
||||||
}
|
}
|
||||||
lastScene = currentScene;
|
lastScene = currentScene;
|
||||||
|
Reference in New Issue
Block a user