diff --git a/src/ExplorerCore.cs b/src/ExplorerCore.cs index e72dfd4..6683e83 100644 --- a/src/ExplorerCore.cs +++ b/src/ExplorerCore.cs @@ -14,7 +14,7 @@ namespace UnityExplorer public class ExplorerCore { public const string NAME = "UnityExplorer"; - public const string VERSION = "3.3.13"; + public const string VERSION = "3.3.14"; public const string AUTHOR = "Sinai"; public const string GUID = "com.sinai.unityexplorer"; diff --git a/src/UI/Main/CSConsole/CSharpConsole.cs b/src/UI/Main/CSConsole/CSharpConsole.cs index 9a13ba5..c495f57 100644 --- a/src/UI/Main/CSConsole/CSharpConsole.cs +++ b/src/UI/Main/CSConsole/CSharpConsole.cs @@ -199,23 +199,8 @@ The following helper methods are available: InputField.onValueChanged.AddListener((string s) => { OnInputChanged(s); }); } - internal static bool IsUserCopyPasting() - { - return (InputManager.GetKey(KeyCode.LeftControl) || InputManager.GetKey(KeyCode.RightControl)) - && InputManager.GetKeyDown(KeyCode.V); - } - public void UpdateConsole() { - if (s_copyPasteBuffer != null) - { - if (!IsUserCopyPasting()) - { - OnInputChanged(s_copyPasteBuffer); - - s_copyPasteBuffer = null; - } - } if (EnableCtrlRShortcut) { @@ -288,16 +273,14 @@ The following helper methods are available: AutoCompleter.ClearAutocompletes(); } - internal static string s_copyPasteBuffer; + private static float s_timeOfLastUpdate; public void OnInputChanged(string newText, bool forceUpdate = false) { - if (IsUserCopyPasting()) - { - //Console.WriteLine("Copy+Paste detected!"); - s_copyPasteBuffer = newText; + if (Time.time <= s_timeOfLastUpdate) return; - } + + s_timeOfLastUpdate = Time.time; if (EnableAutoIndent) UpdateIndent(newText);