mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-12 14:57:33 +08:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
1c5306b7c8 | |||
ea1e183c4a | |||
8080129d58 | |||
4b8298fd2e | |||
ad055b4383 |
@ -6,6 +6,10 @@
|
|||||||
An in-game explorer and a suite of debugging tools for <a href="https://docs.unity3d.com/Manual/IL2CPP.html">IL2CPP</a> and <b>Mono</b> Unity games, to aid with modding development.
|
An in-game explorer and a suite of debugging tools for <a href="https://docs.unity3d.com/Manual/IL2CPP.html">IL2CPP</a> and <b>Mono</b> Unity games, to aid with modding development.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
Supports most Unity games from versions 5.2 to 2020+.
|
||||||
|
</p>
|
||||||
|
|
||||||
## Releases [](../../releases/latest) [](../../releases) [](../../releases/latest)
|
## Releases [](../../releases/latest) [](../../releases) [](../../releases/latest)
|
||||||
|
|
||||||
| Mod Loader | IL2CPP | Mono |
|
| Mod Loader | IL2CPP | Mono |
|
||||||
|
@ -62,7 +62,7 @@ namespace UnityExplorer.Core.Input
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
ExplorerCore.LogWarning($"Exception setting up Camera.onPostRender callback: {ex}");
|
ExplorerCore.LogWarning($"Exception setting up Aggressive Mouse Unlock: {ex}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,9 +72,7 @@ namespace UnityExplorer.Core.Input
|
|||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
ExplorerCore.Log("Yielding end of frame");
|
|
||||||
yield return _waitForEndOfFrame;
|
yield return _waitForEndOfFrame;
|
||||||
ExplorerCore.Log("Yielded");
|
|
||||||
|
|
||||||
if (UIManager.ShowMenu)
|
if (UIManager.ShowMenu)
|
||||||
UpdateCursorControl();
|
UpdateCursorControl();
|
||||||
|
@ -14,7 +14,7 @@ namespace UnityExplorer
|
|||||||
public class ExplorerCore
|
public class ExplorerCore
|
||||||
{
|
{
|
||||||
public const string NAME = "UnityExplorer";
|
public const string NAME = "UnityExplorer";
|
||||||
public const string VERSION = "3.3.13";
|
public const string VERSION = "3.3.15";
|
||||||
public const string AUTHOR = "Sinai";
|
public const string AUTHOR = "Sinai";
|
||||||
public const string GUID = "com.sinai.unityexplorer";
|
public const string GUID = "com.sinai.unityexplorer";
|
||||||
|
|
||||||
|
@ -199,23 +199,10 @@ The following helper methods are available:
|
|||||||
InputField.onValueChanged.AddListener((string s) => { OnInputChanged(s); });
|
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()
|
public void UpdateConsole()
|
||||||
{
|
{
|
||||||
if (s_copyPasteBuffer != null)
|
if (Time.time > s_timeOfLastInternalSet)
|
||||||
{
|
Writing = false;
|
||||||
if (!IsUserCopyPasting())
|
|
||||||
{
|
|
||||||
OnInputChanged(s_copyPasteBuffer);
|
|
||||||
|
|
||||||
s_copyPasteBuffer = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (EnableCtrlRShortcut)
|
if (EnableCtrlRShortcut)
|
||||||
{
|
{
|
||||||
@ -274,6 +261,8 @@ The following helper methods are available:
|
|||||||
|
|
||||||
public void UseAutocomplete(string suggestion)
|
public void UseAutocomplete(string suggestion)
|
||||||
{
|
{
|
||||||
|
Writing = true;
|
||||||
|
|
||||||
string input = InputField.text;
|
string input = InputField.text;
|
||||||
input = input.Insert(m_lastCaretPos, suggestion);
|
input = input.Insert(m_lastCaretPos, suggestion);
|
||||||
InputField.text = input;
|
InputField.text = input;
|
||||||
@ -288,20 +277,32 @@ The following helper methods are available:
|
|||||||
AutoCompleter.ClearAutocompletes();
|
AutoCompleter.ClearAutocompletes();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string s_copyPasteBuffer;
|
private static float s_timeOfLastUpdate;
|
||||||
|
private static bool Writing
|
||||||
|
{
|
||||||
|
get => s_writing;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value)
|
||||||
|
s_timeOfLastInternalSet = Time.time;
|
||||||
|
s_writing = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private static bool s_writing;
|
||||||
|
private static float s_timeOfLastInternalSet;
|
||||||
|
|
||||||
public void OnInputChanged(string newText, bool forceUpdate = false)
|
public void OnInputChanged(string newText, bool forceUpdate = false)
|
||||||
{
|
{
|
||||||
if (IsUserCopyPasting())
|
if (!Writing && Time.time <= s_timeOfLastUpdate)
|
||||||
{
|
|
||||||
//Console.WriteLine("Copy+Paste detected!");
|
|
||||||
s_copyPasteBuffer = newText;
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
s_timeOfLastUpdate = Time.time;
|
||||||
|
|
||||||
if (EnableAutoIndent)
|
if (EnableAutoIndent)
|
||||||
UpdateIndent(newText);
|
UpdateIndent(newText);
|
||||||
|
|
||||||
|
Writing = true;
|
||||||
|
|
||||||
if (!forceUpdate && string.IsNullOrEmpty(newText))
|
if (!forceUpdate && string.IsNullOrEmpty(newText))
|
||||||
inputHighlightText.text = string.Empty;
|
inputHighlightText.text = string.Empty;
|
||||||
else
|
else
|
||||||
@ -378,6 +379,8 @@ The following helper methods are available:
|
|||||||
|
|
||||||
private void AutoIndentCaret()
|
private void AutoIndentCaret()
|
||||||
{
|
{
|
||||||
|
Writing = true;
|
||||||
|
|
||||||
if (CurrentIndent > 0)
|
if (CurrentIndent > 0)
|
||||||
{
|
{
|
||||||
string indent = GetAutoIndentTab(CurrentIndent);
|
string indent = GetAutoIndentTab(CurrentIndent);
|
||||||
|
Reference in New Issue
Block a user