mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-04 12:32:23 +08:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
f54ff89290 | |||
62d565777d | |||
870f82ab26 | |||
9370c5e0e6 | |||
b8cf96438c |
Binary file not shown.
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "com.sinai-dev.unityexplorer",
|
"name": "com.sinai-dev.unityexplorer",
|
||||||
"version": "4.7.9",
|
"version": "4.7.11",
|
||||||
"displayName": "UnityExplorer",
|
"displayName": "UnityExplorer",
|
||||||
"description": "An in-game UI for exploring, debugging and modifying Unity games.",
|
"description": "An in-game UI for exploring, debugging and modifying Unity games.",
|
||||||
"unity": "2017.1",
|
"unity": "2017.1",
|
||||||
|
@ -416,7 +416,7 @@ namespace UnityExplorer.CSConsole
|
|||||||
{
|
{
|
||||||
// Determine the current and next line
|
// Determine the current and next line
|
||||||
UILineInfo thisline = default;
|
UILineInfo thisline = default;
|
||||||
UILineInfo nextLine = default;
|
UILineInfo? nextLine = null;
|
||||||
for (int i = 0; i < Input.Component.cachedInputTextGenerator.lineCount; i++)
|
for (int i = 0; i < Input.Component.cachedInputTextGenerator.lineCount; i++)
|
||||||
{
|
{
|
||||||
UILineInfo line = Input.Component.cachedInputTextGenerator.lines[i];
|
UILineInfo line = Input.Component.cachedInputTextGenerator.lines[i];
|
||||||
@ -431,25 +431,26 @@ namespace UnityExplorer.CSConsole
|
|||||||
|
|
||||||
if (toStart)
|
if (toStart)
|
||||||
{
|
{
|
||||||
// Determine where the non-whitespace text begins
|
// Determine where the indented text begins
|
||||||
int nonWhitespaceStartIdx = thisline.startCharIdx;
|
int endOfLine = nextLine == null ? Input.Text.Length : nextLine.Value.startCharIdx;
|
||||||
while (char.IsWhiteSpace(Input.Text[nonWhitespaceStartIdx]))
|
int indentedStart = thisline.startCharIdx;
|
||||||
nonWhitespaceStartIdx++;
|
while (indentedStart < endOfLine - 1 && char.IsWhiteSpace(Input.Text[indentedStart]))
|
||||||
|
indentedStart++;
|
||||||
|
|
||||||
// Jump to either the true start or the non-whitespace position,
|
// Jump to either the true start or the non-whitespace position,
|
||||||
// depending on which one we are not at.
|
// depending on which one we are not at.
|
||||||
if (LastCaretPosition == nonWhitespaceStartIdx)
|
if (LastCaretPosition == indentedStart)
|
||||||
SetCaretPosition(thisline.startCharIdx);
|
SetCaretPosition(thisline.startCharIdx);
|
||||||
else // jump to the next line start index - 1, ie. end of this line
|
else
|
||||||
SetCaretPosition(nonWhitespaceStartIdx);
|
SetCaretPosition(indentedStart);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If there is no next line, jump to the end of this line (+1, to the invisible next character position)
|
// If there is no next line, jump to the end of this line (+1, to the invisible next character position)
|
||||||
if (nextLine.startCharIdx <= 0)
|
if (nextLine == null)
|
||||||
SetCaretPosition(Input.Text.Length);
|
SetCaretPosition(Input.Text.Length);
|
||||||
else
|
else // jump to the next line start index - 1, ie. end of this line
|
||||||
SetCaretPosition(nextLine.startCharIdx - 1);
|
SetCaretPosition(nextLine.Value.startCharIdx - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ namespace UnityExplorer
|
|||||||
public static class ExplorerCore
|
public static class ExplorerCore
|
||||||
{
|
{
|
||||||
public const string NAME = "UnityExplorer";
|
public const string NAME = "UnityExplorer";
|
||||||
public const string VERSION = "4.7.9";
|
public const string VERSION = "4.7.11";
|
||||||
public const string AUTHOR = "Sinai";
|
public const string AUTHOR = "Sinai";
|
||||||
public const string GUID = "com.sinai.unityexplorer";
|
public const string GUID = "com.sinai.unityexplorer";
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ namespace UnityExplorer.UI.Panels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetSuggestions(List<Suggestion> suggestions, bool jumpToTop = false)
|
public void SetSuggestions(List<Suggestion> suggestions, bool jumpToTop = true)
|
||||||
{
|
{
|
||||||
Suggestions = suggestions;
|
Suggestions = suggestions;
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ namespace UnityExplorer.UI.Panels
|
|||||||
base.UIRoot.SetActive(true);
|
base.UIRoot.SetActive(true);
|
||||||
base.UIRoot.transform.SetAsLastSibling();
|
base.UIRoot.transform.SetAsLastSibling();
|
||||||
buttonListDataHandler.RefreshData();
|
buttonListDataHandler.RefreshData();
|
||||||
scrollPool.Refresh(true, false);
|
scrollPool.Refresh(true, jumpToTop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,13 +238,18 @@ namespace UnityExplorer.UI.Panels
|
|||||||
|
|
||||||
InputFieldRef input = CurrentHandler.InputField;
|
InputFieldRef input = CurrentHandler.InputField;
|
||||||
|
|
||||||
if (!input.Component.isFocused || input.Component.caretPosition == lastCaretPosition && input.UIRoot.transform.position == lastInputPosition)
|
//if (!input.Component.isFocused
|
||||||
|
// || (input.Component.caretPosition == lastCaretPosition && input.UIRoot.transform.position == lastInputPosition))
|
||||||
|
// return;
|
||||||
|
|
||||||
|
if (input.Component.caretPosition == lastCaretPosition && input.UIRoot.transform.position == lastInputPosition)
|
||||||
return;
|
return;
|
||||||
lastInputPosition = input.UIRoot.transform.position;
|
|
||||||
lastCaretPosition = input.Component.caretPosition;
|
|
||||||
|
|
||||||
if (CurrentHandler.AnchorToCaretPosition)
|
if (CurrentHandler.AnchorToCaretPosition)
|
||||||
{
|
{
|
||||||
|
if (!input.Component.isFocused)
|
||||||
|
return;
|
||||||
|
|
||||||
TextGenerator textGen = input.Component.cachedInputTextGenerator;
|
TextGenerator textGen = input.Component.cachedInputTextGenerator;
|
||||||
int caretIdx = Math.Max(0, Math.Min(textGen.characterCount - 1, input.Component.caretPosition));
|
int caretIdx = Math.Max(0, Math.Min(textGen.characterCount - 1, input.Component.caretPosition));
|
||||||
|
|
||||||
@ -261,6 +266,9 @@ namespace UnityExplorer.UI.Panels
|
|||||||
uiRoot.transform.position = input.Transform.position + new Vector3(-(input.Transform.rect.width / 2) + 10, -20, 0);
|
uiRoot.transform.position = input.Transform.position + new Vector3(-(input.Transform.rect.width / 2) + 10, -20, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lastInputPosition = input.UIRoot.transform.position;
|
||||||
|
lastCaretPosition = input.Component.caretPosition;
|
||||||
|
|
||||||
this.Dragger.OnEndResize();
|
this.Dragger.OnEndResize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,14 +112,14 @@ namespace UnityExplorer.UI
|
|||||||
Notification.Init();
|
Notification.Init();
|
||||||
ConsoleController.Init();
|
ConsoleController.Init();
|
||||||
|
|
||||||
// Set default menu visibility
|
|
||||||
ShowMenu = !ConfigManager.Hide_On_Startup.Value;
|
|
||||||
|
|
||||||
// Failsafe fix, in some games all dropdowns displayed values are blank on startup for some reason.
|
// Failsafe fix, in some games all dropdowns displayed values are blank on startup for some reason.
|
||||||
foreach (Dropdown dropdown in UIRoot.GetComponentsInChildren<Dropdown>(true))
|
foreach (Dropdown dropdown in UIRoot.GetComponentsInChildren<Dropdown>(true))
|
||||||
dropdown.RefreshShownValue();
|
dropdown.RefreshShownValue();
|
||||||
|
|
||||||
Initializing = false;
|
Initializing = false;
|
||||||
|
|
||||||
|
if (ConfigManager.Hide_On_Startup.Value)
|
||||||
|
ShowMenu = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main UI Update loop
|
// Main UI Update loop
|
||||||
|
@ -79,11 +79,11 @@
|
|||||||
<!-- il2cpp nuget -->
|
<!-- il2cpp nuget -->
|
||||||
<ItemGroup Condition="'$(Configuration)'=='ML_Cpp_net6' or '$(Configuration)'=='ML_Cpp_net472' or '$(Configuration)'=='STANDALONE_Cpp' or '$(Configuration)'=='BIE_Cpp'">
|
<ItemGroup Condition="'$(Configuration)'=='ML_Cpp_net6' or '$(Configuration)'=='ML_Cpp_net472' or '$(Configuration)'=='STANDALONE_Cpp' or '$(Configuration)'=='BIE_Cpp'">
|
||||||
<PackageReference Include="Il2CppAssemblyUnhollower.BaseLib" Version="0.4.22" IncludeAssets="compile" />
|
<PackageReference Include="Il2CppAssemblyUnhollower.BaseLib" Version="0.4.22" IncludeAssets="compile" />
|
||||||
<PackageReference Include="UniverseLib.IL2CPP" Version="1.3.10" />
|
<PackageReference Include="UniverseLib.IL2CPP" Version="1.3.12" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<!-- mono nuget -->
|
<!-- mono nuget -->
|
||||||
<ItemGroup Condition="'$(Configuration)'=='BIE6_Mono' or '$(Configuration)'=='BIE5_Mono' or '$(Configuration)'=='ML_Mono' or '$(Configuration)'=='STANDALONE_Mono'">
|
<ItemGroup Condition="'$(Configuration)'=='BIE6_Mono' or '$(Configuration)'=='BIE5_Mono' or '$(Configuration)'=='ML_Mono' or '$(Configuration)'=='STANDALONE_Mono'">
|
||||||
<PackageReference Include="UniverseLib.Mono" Version="1.3.10" />
|
<PackageReference Include="UniverseLib.Mono" Version="1.3.12" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- ~~~~~ ASSEMBLY REFERENCES ~~~~~ -->
|
<!-- ~~~~~ ASSEMBLY REFERENCES ~~~~~ -->
|
||||||
|
Reference in New Issue
Block a user