diff --git a/UnityEditorPackage/Runtime/CinematicUnityExplorer.STANDALONE.Mono.dll b/UnityEditorPackage/Runtime/CinematicUnityExplorer.STANDALONE.Mono.dll index a6b6ac4..2e9cc9b 100644 Binary files a/UnityEditorPackage/Runtime/CinematicUnityExplorer.STANDALONE.Mono.dll and b/UnityEditorPackage/Runtime/CinematicUnityExplorer.STANDALONE.Mono.dll differ diff --git a/src/Cinematic/ArrowGenerator.cs b/src/Cinematic/ArrowGenerator.cs index 7b47493..65a79ee 100644 --- a/src/Cinematic/ArrowGenerator.cs +++ b/src/Cinematic/ArrowGenerator.cs @@ -1,6 +1,7 @@ using HarmonyLib; using System.Collections.Generic; using UnityEngine; +using UnityExplorer.Config; #if UNHOLLOWER using IL2CPPUtils = UnhollowerBaseLib.UnhollowerUtils; #endif @@ -12,8 +13,12 @@ namespace UnityExplorer { public class ArrowGenerator { - public static GameObject CreateArrow(Vector3 arrowPosition, Quaternion arrowRotation, Color color){ + public static GameObject CreateArrow(Vector3 arrowPosition, Quaternion arrowRotation, Color color) + { try { + float arrowSizeValue = ConfigManager.Arrow_Size.Value; + Vector3 arrowSize = new Vector3(Math.Max(arrowSizeValue, 0.1f), Math.Max(arrowSizeValue, 0.1f), Math.Max(arrowSizeValue, 0.1f)); + GameObject cylinder = GameObject.CreatePrimitive(PrimitiveType.Cylinder); cylinder.GetComponent().enabled = false; cylinder.GetComponent().mesh = CreateCylinderMesh(0.01f, 20, 2); @@ -34,6 +39,7 @@ namespace UnityExplorer GameObject arrow = new GameObject("CUE-Arrow"); cylinder.transform.SetParent(arrow.transform, true); + arrow.transform.localScale = arrowSize; arrow.transform.position = arrowPosition; arrow.transform.rotation = arrowRotation; arrow.transform.position += 0.5f * arrow.transform.forward; // Move the arrow forward so the cylinder starts on the wanted position diff --git a/src/Cinematic/Cells/LightCell.cs b/src/Cinematic/Cells/LightCell.cs index ac404c5..5596853 100644 --- a/src/Cinematic/Cells/LightCell.cs +++ b/src/Cinematic/Cells/LightCell.cs @@ -1,4 +1,5 @@ using UnityEngine; +using UnityExplorer.Config; using UniverseLib.UI; using UniverseLib.UI.Models; using UniverseLib.UI.Widgets.ScrollView; @@ -69,6 +70,9 @@ namespace UnityExplorer.UI.Panels private void ToggleVisualizer(){ GameObject visualizer = light.transform.GetChild(0).gameObject; + float arrowSize = ConfigManager.Arrow_Size.Value; + Vector3 arrowSizeVec = new Vector3(Math.Max(arrowSize, 0.1f), Math.Max(arrowSize, 0.1f), Math.Max(arrowSize, 0.1f)); + light.transform.GetChild(0).localScale = arrowSizeVec; visualizer.SetActive(!visualizer.activeSelf); } diff --git a/src/Config/ConfigManager.cs b/src/Config/ConfigManager.cs index 8c4a2b3..c95b363 100644 --- a/src/Config/ConfigManager.cs +++ b/src/Config/ConfigManager.cs @@ -32,6 +32,7 @@ namespace UnityExplorer.Config public static ConfigElement Reflection_Hide_NativeInfoPtrs; public static ConfigElement Auto_Scale_UI; public static ConfigElement Reset_Camera_Transform; + public static ConfigElement Arrow_Size; public static ConfigElement Pause; public static ConfigElement Frameskip; @@ -167,7 +168,7 @@ namespace UnityExplorer.Config "Optional keybind to begin a UI-mode Mouse Inspect.", KeyCode.None); - CSConsole_Assembly_Blacklist = new("CSharp Console Assembly Blacklist", + CSConsole_Assembly_Blacklist = new("CSharp Console Assembly Blacklist", "Use this to blacklist Assembly names from being referenced by the C# Console. Requires a Reset of the C# Console.\n" + "Separate each Assembly with a semicolon ';'." + "For example, to blacklist Assembly-CSharp, you would add 'Assembly-CSharp;'", @@ -178,7 +179,7 @@ namespace UnityExplorer.Config "Seperate signatures with a semicolon ';'.\r\n" + "For example, to blacklist Camera.main, you would add 'UnityEngine.Camera.main;'", ""); - + Reflection_Hide_NativeInfoPtrs = new("Hide NativeMethodInfoPtr_s and NativeFieldInfoPtr_s", "Use this to blacklist NativeMethodPtr_s and NativeFieldInfoPtrs_s from the class inspector, mainly to reduce clutter.\r\n" + "For example, this will hide 'Class.NativeFieldInfoPtr_value' for the field 'Class.value'.", @@ -187,15 +188,19 @@ namespace UnityExplorer.Config 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).", 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); + + Arrow_Size = new("Visualizers arrows size", + "Cam Paths nodes and Lights Manager lights visualizers' arrow size (must be positive) (needs visualizer toggled to reflect changes).", + 1f); Pause = new("Pause", "Toggle the pause of the game.", KeyCode.PageUp); - + Frameskip = new("Frameskip", "Skip a frame when the game is paused.", KeyCode.PageDown); @@ -249,7 +254,7 @@ namespace UnityExplorer.Config Left_1 = new("Left 1", "Move the freecam to the left.", KeyCode.A); - + Left_2 = new("Left 2", "Move the freecam to the left, alt key.", KeyCode.LeftArrow); diff --git a/src/Loader/Standalone/Editor/ExplorerEditorBehaviour.cs b/src/Loader/Standalone/Editor/ExplorerEditorBehaviour.cs index 962f7db..4dd8d85 100644 --- a/src/Loader/Standalone/Editor/ExplorerEditorBehaviour.cs +++ b/src/Loader/Standalone/Editor/ExplorerEditorBehaviour.cs @@ -30,6 +30,7 @@ namespace UnityExplorer.Loader.Standalone public bool Auto_Scale_UI; public bool Reset_Camera_Transform; public FreeCamPanel.FreeCameraType Default_Freecam; + public float Arrow_Size = 1f; public KeyCode Pause; public KeyCode Frameskip; @@ -87,6 +88,7 @@ namespace UnityExplorer.Loader.Standalone 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.Arrow_Size.Value = this.Arrow_Size; ConfigManager.Pause.Value = this.Pause; ConfigManager.Frameskip.Value = this.Frameskip;