Compare commits

...

20 Commits
4.1.6 ... 4.1.8

Author SHA1 Message Date
eb221bd868 Bump version 2021-07-02 18:45:09 +10:00
5b516eb4cc Add assembly name to class search result labels 2021-07-02 18:45:03 +10:00
601567f9d2 Remove arbitrary static restriction on class search 2021-07-02 17:53:12 +10:00
7ff508b874 [IL2CPP] Support private interface implementations on IDictionary and IEnumerable 2021-07-02 17:45:18 +10:00
09a7cd35cf Remove known issues from readme -noci 2021-07-02 17:35:34 +10:00
db4a338d26 Update issue template -noci 2021-07-02 17:33:41 +10:00
c08e02057c Create enhancement.yaml 2021-07-02 17:31:36 +10:00
362fcdc51a Update bug_report.yaml 2021-07-02 17:22:24 +10:00
73bd172e4d Update bug_report.yaml 2021-07-02 17:16:09 +10:00
454d3bd0b4 Add bug report issue template 2021-07-02 17:10:26 +10:00
f815a13d9a Namespace cleanup, move some categories out of UI namespace 2021-06-30 07:49:58 +10:00
65c4d49274 Update readme 2021-06-26 18:08:21 +10:00
d99137526e Fix InspectUnderMouse breaking ScrollPool in rare cases 2021-06-22 20:39:46 +10:00
92447b55cd Update README.md 2021-06-22 19:48:41 +10:00
87d5d5a2de Bump version 2021-06-22 19:46:14 +10:00
08cff3386b Fix issues with Il2Cpp nullables 2021-06-22 19:46:09 +10:00
6033200579 Don't use WaitForEndOfFrame in SrollPool init coroutine 2021-06-22 19:45:57 +10:00
94ec1c4908 Update line numbers on panel resize 2021-06-21 19:50:11 +10:00
7a400e762c Cleanup 2021-06-21 19:49:44 +10:00
67f9f744bb Handle Unity 2021+ InputField.onEndEdit change 2021-06-21 19:26:05 +10:00
63 changed files with 348 additions and 198 deletions

61
.github/ISSUE_TEMPLATE/bug_report.yaml vendored Normal file
View File

@ -0,0 +1,61 @@
name: Bug Report
description: File a bug or crash report
title: "[Bug]: "
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for submitting a bug report, please fill out as much detail as possible.
- type: checkboxes
id: latestversion
attributes:
label: Are you on the latest version of UnityExplorer?
description: If not, you must update first.
options:
- label: Yes, I'm on the latest version of UnityExplorer.
required: true
- type: dropdown
id: version
attributes:
label: Which release are you using?
description: Please select your environment for UnityExplorer.
options:
- BepInEx IL2CPP
- BepInEx 6.X Mono
- BepInEx 5.X Mono
- MelonLoader 0.4+ IL2CPP
- MelonLoader 0.4+ Mono
- MelonLoader 0.3 IL2CPP
- MelonLoader 0.3 Mono
- Standalone IL2CPP
- Standalone Mono
validations:
required: true
- type: textarea
id: game
attributes:
label: Which game did this occur on?
description: Please tell us the name of the game. If it's a personal or private project, just let us know the Unity version.
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: Describe the issue.
description: What happened? Should something else have happened instead? Please provide steps to reproduce the issue if possible.
placeholder: Tell us what you see!
validations:
required: true
- type: textarea
id: logs
attributes:
label: Log output
description: |
Please copy and paste your mod loader's log output.
* BepInEx: `BepInEx\LogOutput.log`
* MelonLoader: `MelonLoader\latest.log`
* Standalone: `{DLL_Location}\UnityExplorer\Logs\` (pick the most recent one)
render: shell
validations:
required: true

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1 @@
blank_issues_enabled: false

18
.github/ISSUE_TEMPLATE/enhancement.yaml vendored Normal file
View File

@ -0,0 +1,18 @@
name: New feature or enhancement
description: Suggest or discuss a feature or enhancement for UnityExplorer
title: "[Enhancement]: "
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to discuss UnityExplorer, please provide as much detail as possible.
- type: textarea
id: description
attributes:
label: Describe the new feature or enhancement
description: |
Please go into as much detail as necessary in describing the new feature or enhancement.
If providing examples or suggestions for the required C# code, please use syntax-highlighted code blocks.
validations:
required: true

View File

@ -6,10 +6,7 @@
🔍 An in-game UI for exploring, debugging and modifying Unity games. 🔍 An in-game UI for exploring, debugging and modifying Unity games.
</p> </p>
<p align="center"> <p align="center">
✔️ Supports most Unity versions from 5.2 to 2020+ (IL2CPP and Mono). ✔️ Supports most Unity versions from 5.2 to 2021+ (IL2CPP and Mono).
</p>
<p align="center">
☕ Enjoy this tool? Consider supporting me on <a href="https://ko-fi.com/sinaidev">ko-fi</a>!
</p> </p>
<p align="center"> <p align="center">
⚡ UnityExplorer is on <a href="https://thunderstore.io/package/sinai-dev/UnityExplorer/">Thunderstore</a>! (and as <a href="https://gtfo.thunderstore.io/package/sinai-dev/UnityExplorer_IL2CPP/">IL2CPP</a>) ⚡ UnityExplorer is on <a href="https://thunderstore.io/package/sinai-dev/UnityExplorer/">Thunderstore</a>! (and as <a href="https://gtfo.thunderstore.io/package/sinai-dev/UnityExplorer_IL2CPP/">IL2CPP</a>)
@ -53,11 +50,6 @@ The standalone release can be used with any injector or loader of your choice, b
3. Create an instance of Unity Explorer with `UnityExplorer.ExplorerStandalone.CreateInstance();` 3. Create an instance of Unity Explorer with `UnityExplorer.ExplorerStandalone.CreateInstance();`
4. Optionally subscribe to the `ExplorerStandalone.OnLog` event to handle logging if you wish 4. Optionally subscribe to the `ExplorerStandalone.OnLog` event to handle logging if you wish
# Known issues
* Any `MissingMethodException` or `NotSupportedException`: please report the issue and provide a copy of your mod loader log and/or Unity log.
* In IL2CPP, some IEnumerable and IDictionary types may fail enumeration. Waiting for the Unhollower rewrite to address this any further.
* The C# Console's completions have some minor issues such as not suggestion global classes which have no namespace, and erronously suggesting classes from using directives when they shouldn't be suggested. These are issues with mcs itself which I am looking into.
# Features # Features
<p align="center"> <p align="center">

View File

@ -3,10 +3,11 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityExplorer.UI.CSConsole.Lexers; using UnityExplorer.CSConsole.Lexers;
using UnityExplorer.UI;
using UnityExplorer.UI.Widgets.AutoComplete; using UnityExplorer.UI.Widgets.AutoComplete;
namespace UnityExplorer.UI.CSConsole namespace UnityExplorer.CSConsole
{ {
public class CSAutoCompleter : ISuggestionProvider public class CSAutoCompleter : ISuggestionProvider
{ {

View File

@ -10,11 +10,12 @@ using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.Core.Input; using UnityExplorer.Core.Input;
using UnityExplorer.UI.CSConsole; using UnityExplorer.CSConsole;
using UnityExplorer.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets.AutoComplete; using UnityExplorer.UI.Widgets.AutoComplete;
namespace UnityExplorer.UI.CSConsole namespace UnityExplorer.CSConsole
{ {
public static class ConsoleController public static class ConsoleController
{ {
@ -53,12 +54,38 @@ namespace UnityExplorer.UI.CSConsole
public static void Init() public static void Init()
{ {
// Make sure console is supported on this platform
try try
{ {
ResetConsole(false); ResetConsole(false);
// ensure the compiler is supported (if this fails then SRE is probably stubbed) // ensure the compiler is supported (if this fails then SRE is probably stubbed)
Evaluator.Compile("0 == 0"); Evaluator.Compile("0 == 0");
}
catch (Exception ex)
{
DisableConsole(ex);
return;
}
// Setup console
Lexer = new LexerBuilder();
Completer = new CSAutoCompleter();
SetupHelpInteraction();
Panel.OnInputChanged += OnInputChanged;
Panel.InputScroller.OnScroll += OnInputScrolled;
Panel.OnCompileClicked += Evaluate;
Panel.OnResetClicked += ResetConsole;
Panel.OnHelpDropdownChanged += HelpSelected;
Panel.OnAutoIndentToggled += OnToggleAutoIndent;
Panel.OnCtrlRToggled += OnToggleCtrlRShortcut;
Panel.OnSuggestionsToggled += OnToggleSuggestions;
Panel.OnPanelResized += OnInputScrolled;
// Run startup script
try
{
if (!Directory.Exists(ScriptsFolder)) if (!Directory.Exists(ScriptsFolder))
Directory.CreateDirectory(ScriptsFolder); Directory.CreateDirectory(ScriptsFolder);
@ -73,23 +100,8 @@ namespace UnityExplorer.UI.CSConsole
} }
catch (Exception ex) catch (Exception ex)
{ {
DisableConsole(ex); ExplorerCore.LogWarning($"Exception executing startup script: {ex}");
return;
} }
Lexer = new LexerBuilder();
Completer = new CSAutoCompleter();
SetupHelpInteraction();
Panel.OnInputChanged += OnInputChanged;
Panel.InputScroller.OnScroll += OnInputScrolled;
Panel.OnCompileClicked += Evaluate;
Panel.OnResetClicked += ResetConsole;
Panel.OnHelpDropdownChanged += HelpSelected;
Panel.OnAutoIndentToggled += OnToggleAutoIndent;
Panel.OnCtrlRToggled += OnToggleCtrlRShortcut;
Panel.OnSuggestionsToggled += OnToggleSuggestions;
} }

View File

@ -5,9 +5,9 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI.CSConsole.Lexers; using UnityExplorer.CSConsole.Lexers;
namespace UnityExplorer.UI.CSConsole namespace UnityExplorer.CSConsole
{ {
public struct MatchInfo public struct MatchInfo
{ {

View File

@ -2,7 +2,7 @@
using System.Linq; using System.Linq;
using UnityEngine; using UnityEngine;
namespace UnityExplorer.UI.CSConsole.Lexers namespace UnityExplorer.CSConsole.Lexers
{ {
public class CommentLexer : Lexer public class CommentLexer : Lexer
{ {

View File

@ -2,7 +2,7 @@
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
namespace UnityExplorer.UI.CSConsole.Lexers namespace UnityExplorer.CSConsole.Lexers
{ {
public class KeywordLexer : Lexer public class KeywordLexer : Lexer
{ {

View File

@ -2,7 +2,7 @@
using System.Linq; using System.Linq;
using UnityEngine; using UnityEngine;
namespace UnityExplorer.UI.CSConsole.Lexers namespace UnityExplorer.CSConsole.Lexers
{ {
public abstract class Lexer public abstract class Lexer
{ {

View File

@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace UnityExplorer.UI.CSConsole.Lexers namespace UnityExplorer.CSConsole.Lexers
{ {
public class NumberLexer : Lexer public class NumberLexer : Lexer
{ {

View File

@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
namespace UnityExplorer.UI.CSConsole.Lexers namespace UnityExplorer.CSConsole.Lexers
{ {
public class StringLexer : Lexer public class StringLexer : Lexer
{ {

View File

@ -3,7 +3,7 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
namespace UnityExplorer.UI.CSConsole.Lexers namespace UnityExplorer.CSConsole.Lexers
{ {
public class SymbolLexer : Lexer public class SymbolLexer : Lexer
{ {

View File

@ -7,7 +7,7 @@ using System.Text;
// Thanks to ManlyMarco for this // Thanks to ManlyMarco for this
namespace UnityExplorer.UI.CSConsole namespace UnityExplorer.CSConsole
{ {
public class ScriptEvaluator : Evaluator, IDisposable public class ScriptEvaluator : Evaluator, IDisposable
{ {

View File

@ -13,7 +13,7 @@ using UnityExplorer.Core.Runtime;
To see your output, use the Log panel or a Console Log window. To see your output, use the Log panel or a Console Log window.
*/ */
namespace UnityExplorer.UI.CSConsole namespace UnityExplorer.CSConsole
{ {
public class ScriptInteraction : InteractiveBase public class ScriptInteraction : InteractiveBase
{ {

View File

@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using UnityExplorer.Core.Config; using UnityExplorer.Core.Config;
using UnityExplorer.UI.CacheObject.Views; using UnityExplorer.CacheObject.Views;
namespace UnityExplorer.UI.CacheObject namespace UnityExplorer.CacheObject
{ {
public class CacheConfigEntry : CacheObjectBase public class CacheConfigEntry : CacheObjectBase
{ {

View File

@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using UnityExplorer.UI.Inspectors; using UnityExplorer.Inspectors;
namespace UnityExplorer.UI.CacheObject namespace UnityExplorer.CacheObject
{ {
public class CacheField : CacheMember public class CacheField : CacheMember
{ {

View File

@ -2,10 +2,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using UnityExplorer.UI.CacheObject.IValues; using UnityExplorer.CacheObject.IValues;
using UnityExplorer.UI.CacheObject.Views; using UnityExplorer.CacheObject.Views;
namespace UnityExplorer.UI.CacheObject namespace UnityExplorer.CacheObject
{ {
public class CacheKeyValuePair : CacheObjectBase public class CacheKeyValuePair : CacheObjectBase
{ {

View File

@ -2,10 +2,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using UnityExplorer.UI.CacheObject.IValues; using UnityExplorer.CacheObject.IValues;
using UnityExplorer.UI.CacheObject.Views; using UnityExplorer.CacheObject.Views;
namespace UnityExplorer.UI.CacheObject namespace UnityExplorer.CacheObject
{ {
public class CacheListEntry : CacheObjectBase public class CacheListEntry : CacheObjectBase
{ {

View File

@ -5,11 +5,12 @@ using System.Reflection;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityExplorer.Core.Runtime; using UnityExplorer.Core.Runtime;
using UnityExplorer.UI.CacheObject.Views; using UnityExplorer.CacheObject.Views;
using UnityExplorer.UI.Inspectors; using UnityExplorer.Inspectors;
using UnityExplorer.UI.Models; using UnityExplorer.UI.Models;
using UnityExplorer.UI;
namespace UnityExplorer.UI.CacheObject namespace UnityExplorer.CacheObject
{ {
public abstract class CacheMember : CacheObjectBase public abstract class CacheMember : CacheObjectBase
{ {

View File

@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using UnityExplorer.UI.Inspectors; using UnityExplorer.Inspectors;
namespace UnityExplorer.UI.CacheObject namespace UnityExplorer.CacheObject
{ {
public class CacheMethod : CacheMember public class CacheMethod : CacheMember
{ {

View File

@ -7,11 +7,12 @@ using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.Core.Runtime; using UnityExplorer.Core.Runtime;
using UnityExplorer.UI.CacheObject.IValues; using UnityExplorer.CacheObject.IValues;
using UnityExplorer.UI.CacheObject.Views; using UnityExplorer.CacheObject.Views;
using UnityExplorer.UI.Models; using UnityExplorer.UI.Models;
using UnityExplorer.UI;
namespace UnityExplorer.UI.CacheObject namespace UnityExplorer.CacheObject
{ {
public enum ValueState public enum ValueState
{ {

View File

@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using UnityExplorer.UI.Inspectors; using UnityExplorer.Inspectors;
namespace UnityExplorer.UI.CacheObject namespace UnityExplorer.CacheObject
{ {
public class CacheProperty : CacheMember public class CacheProperty : CacheMember
{ {

View File

@ -3,10 +3,10 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using UnityExplorer.UI.CacheObject; using UnityExplorer.CacheObject;
using UnityExplorer.UI.CacheObject.Views; using UnityExplorer.CacheObject.Views;
namespace UnityExplorer.UI.CacheObject namespace UnityExplorer.CacheObject
{ {
public interface ICacheObjectController public interface ICacheObjectController
{ {

View File

@ -4,9 +4,10 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI.CacheObject; using UnityExplorer.CacheObject;
using UnityExplorer.UI;
namespace UnityExplorer.UI.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {
public class InteractiveColor : InteractiveValue public class InteractiveColor : InteractiveValue
{ {

View File

@ -5,13 +5,14 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI.CacheObject; using UnityExplorer.CacheObject;
using UnityExplorer.UI.CacheObject.Views; using UnityExplorer.CacheObject.Views;
using UnityExplorer.UI.Inspectors; using UnityExplorer.Inspectors;
using UnityExplorer.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
namespace UnityExplorer.UI.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {
public class InteractiveDictionary : InteractiveValue, ICellPoolDataSource<CacheKeyValuePairCell>, ICacheObjectController public class InteractiveDictionary : InteractiveValue, ICellPoolDataSource<CacheKeyValuePairCell>, ICacheObjectController
{ {

View File

@ -5,9 +5,10 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI.CacheObject; using UnityExplorer.CacheObject;
using UnityExplorer.UI;
namespace UnityExplorer.UI.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {
public class InteractiveEnum : InteractiveValue public class InteractiveEnum : InteractiveValue
{ {

View File

@ -5,13 +5,14 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI.CacheObject; using UnityExplorer.CacheObject;
using UnityExplorer.UI.CacheObject.Views; using UnityExplorer.CacheObject.Views;
using UnityExplorer.UI.Inspectors; using UnityExplorer.Inspectors;
using UnityExplorer.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
namespace UnityExplorer.UI.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {
public class InteractiveList : InteractiveValue, ICellPoolDataSource<CacheListEntryCell>, ICacheObjectController public class InteractiveList : InteractiveValue, ICellPoolDataSource<CacheListEntryCell>, ICacheObjectController
{ {

View File

@ -6,10 +6,11 @@ using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.Core.Config; using UnityExplorer.Core.Config;
using UnityExplorer.UI.CacheObject; using UnityExplorer.CacheObject;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
using UnityExplorer.UI;
namespace UnityExplorer.UI.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {
public class InteractiveString : InteractiveValue public class InteractiveString : InteractiveValue
{ {

View File

@ -4,10 +4,11 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI.CacheObject; using UnityExplorer.CacheObject;
using UnityExplorer.UI;
using UnityExplorer.UI.Models; using UnityExplorer.UI.Models;
namespace UnityExplorer.UI.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {
public abstract class InteractiveValue : IPooledObject public abstract class InteractiveValue : IPooledObject
{ {

View File

@ -5,9 +5,10 @@ using System.Reflection;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI.CacheObject; using UnityExplorer.CacheObject;
using UnityExplorer.UI;
namespace UnityExplorer.UI.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {
public class InteractiveValueStruct : InteractiveValue public class InteractiveValueStruct : InteractiveValue
{ {

View File

@ -4,8 +4,9 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI;
namespace UnityExplorer.UI.CacheObject.Views namespace UnityExplorer.CacheObject.Views
{ {
public class ConfigEntryCell : CacheObjectCell public class ConfigEntryCell : CacheObjectCell
{ {

View File

@ -4,11 +4,12 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI.CacheObject.IValues; using UnityExplorer.CacheObject.IValues;
using UnityExplorer.UI.Inspectors; using UnityExplorer.Inspectors;
using UnityExplorer.UI;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
namespace UnityExplorer.UI.CacheObject.Views namespace UnityExplorer.CacheObject.Views
{ {
public class CacheKeyValuePairCell : CacheObjectCell public class CacheKeyValuePairCell : CacheObjectCell
{ {

View File

@ -4,9 +4,9 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI.CacheObject.IValues; using UnityExplorer.CacheObject.IValues;
namespace UnityExplorer.UI.CacheObject.Views namespace UnityExplorer.CacheObject.Views
{ {
public class CacheListEntryCell : CacheObjectCell public class CacheListEntryCell : CacheObjectCell
{ {

View File

@ -4,9 +4,10 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
namespace UnityExplorer.UI.CacheObject.Views namespace UnityExplorer.CacheObject.Views
{ {
public class CacheMemberCell : CacheObjectCell public class CacheMemberCell : CacheObjectCell
{ {

View File

@ -4,11 +4,12 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI.CacheObject.IValues; using UnityExplorer.CacheObject.IValues;
using UnityExplorer.UI.Inspectors; using UnityExplorer.Inspectors;
using UnityExplorer.UI;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
namespace UnityExplorer.UI.CacheObject.Views namespace UnityExplorer.CacheObject.Views
{ {
public abstract class CacheObjectCell : ICell public abstract class CacheObjectCell : ICell
{ {

View File

@ -5,10 +5,11 @@ using System.Reflection;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI;
using UnityExplorer.UI.Models; using UnityExplorer.UI.Models;
using UnityExplorer.UI.Widgets.AutoComplete; using UnityExplorer.UI.Widgets.AutoComplete;
namespace UnityExplorer.UI.CacheObject.Views namespace UnityExplorer.CacheObject.Views
{ {
public class EvaluateWidget : IPooledObject public class EvaluateWidget : IPooledObject
{ {

View File

@ -132,7 +132,6 @@ namespace UnityExplorer
return null; return null;
var type = obj.GetType(); var type = obj.GetType();
try try
{ {
if (IsString(obj)) if (IsString(obj))
@ -216,7 +215,7 @@ namespace UnityExplorer
// from other structs to il2cpp object // from other structs to il2cpp object
else if (typeof(Il2CppSystem.Object).IsAssignableFrom(castTo)) else if (typeof(Il2CppSystem.Object).IsAssignableFrom(castTo))
{ {
return BoxIl2CppObject(obj); return BoxIl2CppObject(obj).TryCast(castTo);
} }
else else
return obj; return obj;
@ -295,7 +294,27 @@ namespace UnityExplorer
try try
{ {
if (toType.IsEnum) if (toType.IsEnum)
{
// Check for nullable enums
var type = cppObj.GetType();
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Il2CppSystem.Nullable<>))
{
var nullable = cppObj.TryCast(type);
var nullableHasValueProperty = type.GetProperty("HasValue");
if ((bool)nullableHasValueProperty.GetValue(nullable, null))
{
// nullable has a value.
var nullableValueProperty = type.GetProperty("Value");
return Enum.Parse(toType, nullableValueProperty.GetValue(nullable, null).ToString());
}
// nullable and no current value.
return cppObj;
}
return Enum.Parse(toType, cppObj.ToString()); return Enum.Parse(toType, cppObj.ToString());
}
// Not enum, unbox with Il2CppObjectBase.Unbox
var name = toType.AssemblyQualifiedName; var name = toType.AssemblyQualifiedName;
@ -785,7 +804,9 @@ namespace UnityExplorer
if (!getEnumeratorMethods.ContainsKey(key)) if (!getEnumeratorMethods.ContainsKey(key))
{ {
getEnumeratorMethods.Add(key, type.GetMethod("GetEnumerator")); var method = type.GetMethod("System_Collections_IEnumerable_GetEnumerator", FLAGS)
?? type.GetMethod("GetEnumerator");
getEnumeratorMethods.Add(key, method);
// ensure the enumerator type is supported // ensure the enumerator type is supported
try try
@ -871,7 +892,9 @@ namespace UnityExplorer
var cacheKey = keys.GetType().AssemblyQualifiedName; var cacheKey = keys.GetType().AssemblyQualifiedName;
if (!getEnumeratorMethods.ContainsKey(cacheKey)) if (!getEnumeratorMethods.ContainsKey(cacheKey))
{ {
getEnumeratorMethods.Add(cacheKey, keyCollType.GetMethod("GetEnumerator")); var method = keyCollType.GetMethod("System_Collections_IDictionary_GetEnumerator", FLAGS)
?? keyCollType.GetMethod("GetEnumerator");
getEnumeratorMethods.Add(cacheKey, method);
// test support // test support
try try

View File

@ -6,7 +6,7 @@ using System.Reflection;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityExplorer.UI; using UnityExplorer.UI;
using UnityExplorer.UI.CacheObject.IValues; using UnityExplorer.CacheObject.IValues;
#if CPP #if CPP
using UnhollowerRuntimeLib; using UnhollowerRuntimeLib;
using UnhollowerBaseLib; using UnhollowerBaseLib;

View File

@ -2,9 +2,11 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using System.Reflection;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.Events; using UnityEngine.Events;
using UnityEngine.UI;
using Object = UnityEngine.Object; using Object = UnityEngine.Object;
// Project-wide namespace for accessibility // Project-wide namespace for accessibility
@ -107,5 +109,16 @@ namespace UnityExplorer
return color; return color;
} }
private static PropertyInfo onEndEdit;
public static UnityEvent<string> GetOnEndEdit(this InputField _this)
{
if (onEndEdit == null)
onEndEdit = typeof(InputField).GetProperty("onEndEdit")
?? throw new Exception("Could not get InputField.onEndEdit property!");
return onEndEdit.GetValue(_this, null).TryCast<UnityEvent<string>>();
}
} }
} }

View File

@ -11,8 +11,8 @@ using UnityExplorer.Core.Input;
using UnityExplorer.Core.Runtime; using UnityExplorer.Core.Runtime;
using UnityExplorer.Tests; using UnityExplorer.Tests;
using UnityExplorer.UI; using UnityExplorer.UI;
using UnityExplorer.UI.Inspectors; using UnityExplorer.Inspectors;
using UnityExplorer.UI.ObjectExplorer; using UnityExplorer.ObjectExplorer;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
namespace UnityExplorer namespace UnityExplorer
@ -20,7 +20,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.1.6"; public const string VERSION = "4.1.8";
public const string AUTHOR = "Sinai"; public const string AUTHOR = "Sinai";
public const string GUID = "com.sinai.unityexplorer"; public const string GUID = "com.sinai.unityexplorer";

View File

@ -6,12 +6,13 @@ using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.Core.Input; using UnityExplorer.Core.Input;
using UnityExplorer.UI;
using UnityExplorer.UI.Models; using UnityExplorer.UI.Models;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
using UnityExplorer.UI.Widgets.AutoComplete; using UnityExplorer.UI.Widgets.AutoComplete;
namespace UnityExplorer.UI.Inspectors namespace UnityExplorer.Inspectors
{ {
public class GameObjectInspector : InspectorBase public class GameObjectInspector : InspectorBase
{ {

View File

@ -4,9 +4,10 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
namespace UnityExplorer.UI.Inspectors namespace UnityExplorer.Inspectors
{ {
public class ComponentCell : ButtonCell public class ComponentCell : ButtonCell
{ {

View File

@ -5,7 +5,7 @@ using System.Text;
using UnityEngine; using UnityEngine;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
namespace UnityExplorer.UI.Inspectors namespace UnityExplorer.Inspectors
{ {
public class ComponentList : ButtonListHandler<Component, ComponentCell> public class ComponentList : ButtonListHandler<Component, ComponentCell>
{ {

View File

@ -5,8 +5,9 @@ using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.Core.Input; using UnityExplorer.Core.Input;
using UnityExplorer.UI;
namespace UnityExplorer.UI.Inspectors namespace UnityExplorer.Inspectors
{ {
public class GameObjectControls public class GameObjectControls
{ {
@ -234,7 +235,7 @@ namespace UnityExplorer.UI.Inspectors
private void OnExploreButtonClicked() private void OnExploreButtonClicked()
{ {
var panel = UIManager.GetPanel<Panels.ObjectExplorerPanel>(UIManager.Panels.ObjectExplorer); var panel = UIManager.GetPanel<UI.Panels.ObjectExplorerPanel>(UIManager.Panels.ObjectExplorer);
panel.SceneExplorer.JumpToTransform(this.Parent.GOTarget.transform); panel.SceneExplorer.JumpToTransform(this.Parent.GOTarget.transform);
} }
@ -468,7 +469,7 @@ namespace UnityExplorer.UI.Inspectors
//UIFactory.SetLayoutElement(pathApplyBtn.Component.gameObject, minHeight: 25, minWidth: 120); //UIFactory.SetLayoutElement(pathApplyBtn.Component.gameObject, minHeight: 25, minWidth: 120);
//pathApplyBtn.OnClick += () => { OnPathEndEdit(PathInput.Text); }; //pathApplyBtn.OnClick += () => { OnPathEndEdit(PathInput.Text); };
PathInput.Component.onEndEdit.AddListener((string val) => { OnPathEndEdit(val); }); PathInput.Component.GetOnEndEdit().AddListener((string val) => { OnPathEndEdit(val); });
// Title and update row // Title and update row
@ -484,7 +485,7 @@ namespace UnityExplorer.UI.Inspectors
NameInput = UIFactory.CreateInputField(titleRow, "NameInput", "untitled"); NameInput = UIFactory.CreateInputField(titleRow, "NameInput", "untitled");
UIFactory.SetLayoutElement(NameInput.Component.gameObject, minHeight: 30, minWidth: 100, flexibleWidth: 9999); UIFactory.SetLayoutElement(NameInput.Component.gameObject, minHeight: 30, minWidth: 100, flexibleWidth: 9999);
NameInput.Component.textComponent.fontSize = 15; NameInput.Component.textComponent.fontSize = 15;
NameInput.Component.onEndEdit.AddListener((string val) => { OnNameEndEdit(val); }); NameInput.Component.GetOnEndEdit().AddListener((string val) => { OnNameEndEdit(val); });
// second row (toggles, instanceID, tag, buttons) // second row (toggles, instanceID, tag, buttons)
@ -521,7 +522,7 @@ namespace UnityExplorer.UI.Inspectors
TagInput = UIFactory.CreateInputField(secondRow, "TagInput", "none"); TagInput = UIFactory.CreateInputField(secondRow, "TagInput", "none");
UIFactory.SetLayoutElement(TagInput.Component.gameObject, minHeight: 25, minWidth: 100, flexibleWidth: 999); UIFactory.SetLayoutElement(TagInput.Component.gameObject, minHeight: 25, minWidth: 100, flexibleWidth: 999);
TagInput.Component.textComponent.color = Color.white; TagInput.Component.textComponent.color = Color.white;
TagInput.Component.onEndEdit.AddListener((string val) => { OnTagEndEdit(val); }); TagInput.Component.GetOnEndEdit().AddListener((string val) => { OnTagEndEdit(val); });
// Instantiate // Instantiate
var instantiateBtn = UIFactory.CreateButton(secondRow, "InstantiateBtn", "Instantiate", new Color(0.2f, 0.2f, 0.2f)); var instantiateBtn = UIFactory.CreateButton(secondRow, "InstantiateBtn", "Instantiate", new Color(0.2f, 0.2f, 0.2f));
@ -644,7 +645,7 @@ namespace UnityExplorer.UI.Inspectors
var inputField = UIFactory.CreateInputField(rowObj, "InputField", "..."); var inputField = UIFactory.CreateInputField(rowObj, "InputField", "...");
UIFactory.SetLayoutElement(inputField.Component.gameObject, minHeight: 25, minWidth: 100, flexibleWidth: 999); UIFactory.SetLayoutElement(inputField.Component.gameObject, minHeight: 25, minWidth: 100, flexibleWidth: 999);
inputField.Component.onEndEdit.AddListener((string value) => { OnTransformInputEndEdit(type, value); }); inputField.Component.GetOnEndEdit().AddListener((string value) => { OnTransformInputEndEdit(type, value); });
var control = new TransformControl(type, inputField); var control = new TransformControl(type, inputField);

View File

@ -11,7 +11,7 @@ using UnityExplorer.Core.Runtime;
using UnityExplorer.UI; using UnityExplorer.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
namespace UnityExplorer.UI.Inspectors namespace UnityExplorer.Inspectors
{ {
public enum MouseInspectMode public enum MouseInspectMode
{ {

View File

@ -4,10 +4,11 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI;
using UnityExplorer.UI.Models; using UnityExplorer.UI.Models;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
namespace UnityExplorer.UI.Inspectors namespace UnityExplorer.Inspectors
{ {
public abstract class InspectorBase : IPooledObject public abstract class InspectorBase : IPooledObject
{ {

View File

@ -5,8 +5,8 @@ using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI; using UnityExplorer.UI;
using UnityExplorer.UI.CacheObject; using UnityExplorer.CacheObject;
using UnityExplorer.UI.Inspectors; using UnityExplorer.Inspectors;
using UnityExplorer.UI.Models; using UnityExplorer.UI.Models;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;

View File

@ -4,10 +4,11 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI;
using UnityExplorer.UI.Models; using UnityExplorer.UI.Models;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
namespace UnityExplorer.UI.Inspectors namespace UnityExplorer.Inspectors
{ {
public class InspectorTab : IPooledObject public class InspectorTab : IPooledObject
{ {

View File

@ -10,12 +10,13 @@ using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.Core.Config; using UnityExplorer.Core.Config;
using UnityExplorer.Core.Runtime; using UnityExplorer.Core.Runtime;
using UnityExplorer.UI.CacheObject; using UnityExplorer.CacheObject;
using UnityExplorer.UI.CacheObject.Views; using UnityExplorer.CacheObject.Views;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
using UnityExplorer.UI;
namespace UnityExplorer.UI.Inspectors namespace UnityExplorer.Inspectors
{ {
public class ReflectionInspector : InspectorBase, ICellPoolDataSource<CacheMemberCell>, ICacheObjectController public class ReflectionInspector : InspectorBase, ICellPoolDataSource<CacheMemberCell>, ICacheObjectController
{ {

View File

@ -4,12 +4,13 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI;
using UnityExplorer.UI.Models; using UnityExplorer.UI.Models;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
using UnityExplorer.UI.Widgets.AutoComplete; using UnityExplorer.UI.Widgets.AutoComplete;
namespace UnityExplorer.UI.ObjectExplorer namespace UnityExplorer.ObjectExplorer
{ {
public class ObjectSearch : UIModel public class ObjectSearch : UIModel
{ {
@ -52,8 +53,8 @@ namespace UnityExplorer.UI.ObjectExplorer
if (m_context == SearchContext.Singleton) if (m_context == SearchContext.Singleton)
currentResults = SearchProvider.SingletonSearch(nameInputField.Text); currentResults = SearchProvider.SingletonSearch(nameInputField.Text);
else if (m_context == SearchContext.StaticClass) else if (m_context == SearchContext.Class)
currentResults = SearchProvider.StaticClassSearch(nameInputField.Text); currentResults = SearchProvider.ClassSearch(nameInputField.Text);
else else
{ {
string compType = ""; string compType = "";
@ -129,8 +130,11 @@ namespace UnityExplorer.UI.ObjectExplorer
if (!cachedCellTexts.ContainsKey(index)) if (!cachedCellTexts.ContainsKey(index))
{ {
string text; string text;
if (m_context == SearchContext.StaticClass) if (m_context == SearchContext.Class)
text = SignatureHighlighter.Parse(currentResults[index] as Type, true); {
var type = currentResults[index] as Type;
text = $"{SignatureHighlighter.Parse(type, true)} <color=grey><i>({type.Assembly.GetName().Name})</i></color>";
}
else else
text = ToStringUtility.ToStringWithType(currentResults[index], currentResults[index]?.GetActualType()); text = ToStringUtility.ToStringWithType(currentResults[index], currentResults[index]?.GetActualType());
@ -142,7 +146,7 @@ namespace UnityExplorer.UI.ObjectExplorer
private void OnCellClicked(int dataIndex) private void OnCellClicked(int dataIndex)
{ {
if (m_context == SearchContext.StaticClass) if (m_context == SearchContext.Class)
InspectorManager.Inspect(currentResults[dataIndex] as Type); InspectorManager.Inspect(currentResults[dataIndex] as Type);
else else
InspectorManager.Inspect(currentResults[dataIndex]); InspectorManager.Inspect(currentResults[dataIndex]);

View File

@ -8,11 +8,12 @@ using UnityEngine;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.Core; using UnityExplorer.Core;
using UnityExplorer.UI;
using UnityExplorer.UI.Models; using UnityExplorer.UI.Models;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
namespace UnityExplorer.UI.ObjectExplorer namespace UnityExplorer.ObjectExplorer
{ {
public class SceneExplorer : UIModel public class SceneExplorer : UIModel
{ {

View File

@ -6,7 +6,7 @@ using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
namespace UnityExplorer.UI.ObjectExplorer namespace UnityExplorer.ObjectExplorer
{ {
public static class SceneHandler public static class SceneHandler
{ {

View File

@ -8,14 +8,13 @@ using UnityEngine.SceneManagement;
using UnityExplorer.Core; using UnityExplorer.Core;
using UnityExplorer.Core.Runtime; using UnityExplorer.Core.Runtime;
namespace UnityExplorer.UI.ObjectExplorer namespace UnityExplorer.ObjectExplorer
{ {
public enum SearchContext public enum SearchContext
{ {
UnityObject, UnityObject,
// GameObject,
Singleton, Singleton,
StaticClass Class
} }
public enum ChildFilter public enum ChildFilter
@ -134,7 +133,7 @@ namespace UnityExplorer.UI.ObjectExplorer
return results; return results;
} }
internal static List<object> StaticClassSearch(string input) internal static List<object> ClassSearch(string input)
{ {
var list = new List<object>(); var list = new List<object>();
@ -144,11 +143,10 @@ namespace UnityExplorer.UI.ObjectExplorer
foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) foreach (var asm in AppDomain.CurrentDomain.GetAssemblies())
{ {
foreach (var type in asm.TryGetTypes().Where(it => it.IsSealed && it.IsAbstract)) foreach (var type in asm.TryGetTypes())
{ {
if (!string.IsNullOrEmpty(nameFilter) && !type.FullName.ContainsIgnoreCase(nameFilter)) if (!string.IsNullOrEmpty(nameFilter) && !type.FullName.ContainsIgnoreCase(nameFilter))
continue; continue;
list.Add(type); list.Add(type);
} }
} }

View File

@ -7,7 +7,7 @@ using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.Core.Config; using UnityExplorer.Core.Config;
using UnityExplorer.UI.CSConsole; using UnityExplorer.CSConsole;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
namespace UnityExplorer.UI.Panels namespace UnityExplorer.UI.Panels
@ -35,6 +35,7 @@ namespace UnityExplorer.UI.Panels
public Action<bool> OnCtrlRToggled; public Action<bool> OnCtrlRToggled;
public Action<bool> OnSuggestionsToggled; public Action<bool> OnSuggestionsToggled;
public Action<bool> OnAutoIndentToggled; public Action<bool> OnAutoIndentToggled;
public Action OnPanelResized;
private void InvokeOnValueChanged(string value) private void InvokeOnValueChanged(string value)
{ {
@ -62,6 +63,11 @@ namespace UnityExplorer.UI.Panels
// UI Construction // UI Construction
public override void OnFinishResize(RectTransform panel)
{
OnPanelResized?.Invoke();
}
protected internal override void DoSetDefaultPosAndAnchors() protected internal override void DoSetDefaultPosAndAnchors()
{ {
Rect.localPosition = Vector2.zero; Rect.localPosition = Vector2.zero;

View File

@ -6,7 +6,7 @@ using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.Core.Config; using UnityExplorer.Core.Config;
using UnityExplorer.UI.Inspectors; using UnityExplorer.Inspectors;
namespace UnityExplorer.UI.Panels namespace UnityExplorer.UI.Panels
{ {

View File

@ -11,7 +11,7 @@ using UnityEngine.UI;
using UnityExplorer.Core; using UnityExplorer.Core;
using UnityExplorer.Core.Config; using UnityExplorer.Core.Config;
using UnityExplorer.UI.Models; using UnityExplorer.UI.Models;
using UnityExplorer.UI.ObjectExplorer; using UnityExplorer.ObjectExplorer;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
namespace UnityExplorer.UI.Panels namespace UnityExplorer.UI.Panels

View File

@ -5,8 +5,8 @@ using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.Core.Config; using UnityExplorer.Core.Config;
using UnityExplorer.UI.CacheObject; using UnityExplorer.CacheObject;
using UnityExplorer.UI.CacheObject.Views; using UnityExplorer.CacheObject.Views;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
namespace UnityExplorer.UI.Panels namespace UnityExplorer.UI.Panels

View File

@ -23,6 +23,7 @@ namespace UnityExplorer.UI.Panels
{ {
s_resizeCursorObj.SetActive(false); s_resizeCursorObj.SetActive(false);
wasAnyDragging = false; wasAnyDragging = false;
Resizing = false;
foreach (var instance in Instances) foreach (var instance in Instances)
{ {

View File

@ -8,8 +8,8 @@ using UnityEngine.EventSystems;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.Core.Config; using UnityExplorer.Core.Config;
using UnityExplorer.Core.Input; using UnityExplorer.Core.Input;
using UnityExplorer.UI.CSConsole; using UnityExplorer.CSConsole;
using UnityExplorer.UI.Inspectors; using UnityExplorer.Inspectors;
using UnityExplorer.UI.Models; using UnityExplorer.UI.Models;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
@ -378,7 +378,7 @@ namespace UnityExplorer.UI
timeInput = UIFactory.CreateInputField(navbarPanel, "TimeInput", "timeScale"); timeInput = UIFactory.CreateInputField(navbarPanel, "TimeInput", "timeScale");
UIFactory.SetLayoutElement(timeInput.Component.gameObject, minHeight: 25, minWidth: 40); UIFactory.SetLayoutElement(timeInput.Component.gameObject, minHeight: 25, minWidth: 40);
timeInput.Text = Time.timeScale.ToString("F2"); timeInput.Text = Time.timeScale.ToString("F2");
timeInput.Component.onEndEdit.AddListener(OnTimeInputEndEdit); timeInput.Component.GetOnEndEdit().AddListener(OnTimeInputEndEdit);
pauseBtn = UIFactory.CreateButton(navbarPanel, "PauseButton", "||", new Color(0.2f, 0.2f, 0.2f)); pauseBtn = UIFactory.CreateButton(navbarPanel, "PauseButton", "||", new Color(0.2f, 0.2f, 0.2f));
UIFactory.SetLayoutElement(pauseBtn.Component.gameObject, minHeight: 25, minWidth: 25); UIFactory.SetLayoutElement(pauseBtn.Component.gameObject, minHeight: 25, minWidth: 25);

View File

@ -193,12 +193,11 @@ namespace UnityExplorer.UI.Widgets
RuntimeProvider.Instance.StartCoroutine(InitCoroutine(onHeightChangedListener)); RuntimeProvider.Instance.StartCoroutine(InitCoroutine(onHeightChangedListener));
} }
private WaitForEndOfFrame waitForEndOfFrame = new WaitForEndOfFrame();
private IEnumerator InitCoroutine(Action onHeightChangedListener) private IEnumerator InitCoroutine(Action onHeightChangedListener)
{ {
ScrollRect.content.anchoredPosition = Vector2.zero; ScrollRect.content.anchoredPosition = Vector2.zero;
yield return waitForEndOfFrame ?? (waitForEndOfFrame = new WaitForEndOfFrame()); yield return null;
yield return null;
LayoutRebuilder.ForceRebuildLayoutImmediate(Content); LayoutRebuilder.ForceRebuildLayoutImmediate(Content);

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using UnityExplorer.UI.Inspectors; using UnityExplorer.Inspectors;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
namespace UnityExplorer.UI.Widgets namespace UnityExplorer.UI.Widgets

View File

@ -143,12 +143,12 @@
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<!-- BepInEx universal refs --> <!-- BepInEx universal refs -->
<ItemGroup Condition="'$(IsBepInEx)'=='true'"> <ItemGroup Condition="'$(IsBepInEx)'=='true'">
<Reference Include="0Harmony"> <Reference Include="0Harmony">
<HintPath>packages\HarmonyX.2.4.2\lib\net35\0Harmony.dll</HintPath> <HintPath>packages\HarmonyX.2.4.2\lib\net35\0Harmony.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<!-- BepInEx 5 Mono refs --> <!-- BepInEx 5 Mono refs -->
<ItemGroup Condition="'$(IsBepInEx)|$(IsCpp)|$(Configuration)'=='true|false|Release_BIE5_Mono'"> <ItemGroup Condition="'$(IsBepInEx)|$(IsCpp)|$(Configuration)'=='true|false|Release_BIE5_Mono'">
<Reference Include="BepInEx"> <Reference Include="BepInEx">
@ -180,10 +180,10 @@
</ItemGroup> </ItemGroup>
<!-- Standalone refs --> <!-- Standalone refs -->
<ItemGroup Condition="'$(IsStandalone)'=='true'"> <ItemGroup Condition="'$(IsStandalone)'=='true'">
<Reference Include="0Harmony"> <Reference Include="0Harmony">
<HintPath>packages\HarmonyX.2.4.2\lib\net35\0Harmony.dll</HintPath> <HintPath>packages\HarmonyX.2.4.2\lib\net35\0Harmony.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<!-- Mono refs --> <!-- Mono refs -->
<ItemGroup Condition="'$(IsCpp)'=='false'"> <ItemGroup Condition="'$(IsCpp)'=='false'">
@ -241,54 +241,54 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Core\Config\InternalConfigHandler.cs" /> <Compile Include="Core\Config\InternalConfigHandler.cs" />
<Compile Include="UI\CacheObject\CacheConfigEntry.cs" /> <Compile Include="CacheObject\CacheConfigEntry.cs" />
<Compile Include="UI\CacheObject\Views\CacheConfigCell.cs" /> <Compile Include="CacheObject\Views\CacheConfigCell.cs" />
<Compile Include="UI\CSConsole\CSAutoCompleter.cs" /> <Compile Include="CSConsole\CSAutoCompleter.cs" />
<Compile Include="UI\CSConsole\LexerBuilder.cs" /> <Compile Include="CSConsole\LexerBuilder.cs" />
<Compile Include="UI\CSConsole\Lexers\CommentLexer.cs" /> <Compile Include="CSConsole\Lexers\CommentLexer.cs" />
<Compile Include="UI\CSConsole\Lexers\KeywordLexer.cs" /> <Compile Include="CSConsole\Lexers\KeywordLexer.cs" />
<Compile Include="UI\CSConsole\Lexers\Lexer.cs" /> <Compile Include="CSConsole\Lexers\Lexer.cs" />
<Compile Include="UI\CSConsole\Lexers\NumberLexer.cs" /> <Compile Include="CSConsole\Lexers\NumberLexer.cs" />
<Compile Include="UI\CSConsole\Lexers\StringLexer.cs" /> <Compile Include="CSConsole\Lexers\StringLexer.cs" />
<Compile Include="UI\CSConsole\Lexers\SymbolLexer.cs" /> <Compile Include="CSConsole\Lexers\SymbolLexer.cs" />
<Compile Include="UI\CSConsole\ScriptEvaluator.cs" /> <Compile Include="CSConsole\ScriptEvaluator.cs" />
<Compile Include="UI\CSConsole\ScriptInteraction.cs" /> <Compile Include="CSConsole\ScriptInteraction.cs" />
<Compile Include="Core\ExplorerBehaviour.cs" /> <Compile Include="Core\ExplorerBehaviour.cs" />
<Compile Include="Core\Reflection\Extensions.cs" /> <Compile Include="Core\Reflection\Extensions.cs" />
<Compile Include="Core\Reflection\Il2CppReflection.cs" /> <Compile Include="Core\Reflection\Il2CppReflection.cs" />
<Compile Include="Core\Utility\ArgumentUtility.cs" /> <Compile Include="Core\Utility\ArgumentUtility.cs" />
<Compile Include="Core\Utility\MiscUtility.cs" /> <Compile Include="Core\Utility\MiscUtility.cs" />
<Compile Include="Core\Utility\ParseUtility.cs" /> <Compile Include="Core\Utility\ParseUtility.cs" />
<Compile Include="UI\Inspectors\GameObjectWidgets\ComponentCell.cs" /> <Compile Include="Inspectors\GameObjectWidgets\ComponentCell.cs" />
<Compile Include="UI\Inspectors\GameObjectWidgets\ComponentList.cs" /> <Compile Include="Inspectors\GameObjectWidgets\ComponentList.cs" />
<Compile Include="UI\Inspectors\GameObjectWidgets\GameObjectControls.cs" /> <Compile Include="Inspectors\GameObjectWidgets\GameObjectControls.cs" />
<Compile Include="UI\Inspectors\InspectUnderMouse.cs" /> <Compile Include="Inspectors\InspectUnderMouse.cs" />
<Compile Include="UI\CSConsole\ConsoleController.cs" /> <Compile Include="CSConsole\ConsoleController.cs" />
<Compile Include="UI\CacheObject\CacheField.cs" /> <Compile Include="CacheObject\CacheField.cs" />
<Compile Include="UI\CacheObject\CacheKeyValuePair.cs" /> <Compile Include="CacheObject\CacheKeyValuePair.cs" />
<Compile Include="UI\CacheObject\CacheListEntry.cs" /> <Compile Include="CacheObject\CacheListEntry.cs" />
<Compile Include="UI\CacheObject\CacheMember.cs" /> <Compile Include="CacheObject\CacheMember.cs" />
<Compile Include="UI\CacheObject\CacheMethod.cs" /> <Compile Include="CacheObject\CacheMethod.cs" />
<Compile Include="UI\CacheObject\CacheObjectBase.cs" /> <Compile Include="CacheObject\CacheObjectBase.cs" />
<Compile Include="UI\CacheObject\CacheProperty.cs" /> <Compile Include="CacheObject\CacheProperty.cs" />
<Compile Include="UI\CacheObject\Views\CacheKeyValuePairCell.cs" /> <Compile Include="CacheObject\Views\CacheKeyValuePairCell.cs" />
<Compile Include="UI\CacheObject\Views\CacheListEntryCell.cs" /> <Compile Include="CacheObject\Views\CacheListEntryCell.cs" />
<Compile Include="UI\CacheObject\Views\CacheMemberCell.cs" /> <Compile Include="CacheObject\Views\CacheMemberCell.cs" />
<Compile Include="UI\CacheObject\Views\CacheObjectCell.cs" /> <Compile Include="CacheObject\Views\CacheObjectCell.cs" />
<Compile Include="UI\CacheObject\Views\EvaluateWidget.cs" /> <Compile Include="CacheObject\Views\EvaluateWidget.cs" />
<Compile Include="UI\Inspectors\GameObjectInspector.cs" /> <Compile Include="Inspectors\GameObjectInspector.cs" />
<Compile Include="UI\CacheObject\ICacheObjectController.cs" /> <Compile Include="CacheObject\ICacheObjectController.cs" />
<Compile Include="UI\Inspectors\InspectorManager.cs" /> <Compile Include="Inspectors\InspectorManager.cs" />
<Compile Include="UI\Inspectors\InspectorTab.cs" /> <Compile Include="Inspectors\InspectorTab.cs" />
<Compile Include="UI\Inspectors\InspectorBase.cs" /> <Compile Include="Inspectors\InspectorBase.cs" />
<Compile Include="UI\CacheObject\IValues\InteractiveColor.cs" /> <Compile Include="CacheObject\IValues\InteractiveColor.cs" />
<Compile Include="UI\CacheObject\IValues\InteractiveDictionary.cs" /> <Compile Include="CacheObject\IValues\InteractiveDictionary.cs" />
<Compile Include="UI\CacheObject\IValues\InteractiveEnum.cs" /> <Compile Include="CacheObject\IValues\InteractiveEnum.cs" />
<Compile Include="UI\CacheObject\IValues\InteractiveList.cs" /> <Compile Include="CacheObject\IValues\InteractiveList.cs" />
<Compile Include="UI\CacheObject\IValues\InteractiveString.cs" /> <Compile Include="CacheObject\IValues\InteractiveString.cs" />
<Compile Include="UI\CacheObject\IValues\InteractiveValue.cs" /> <Compile Include="CacheObject\IValues\InteractiveValue.cs" />
<Compile Include="UI\Inspectors\ReflectionInspector.cs" /> <Compile Include="Inspectors\ReflectionInspector.cs" />
<Compile Include="UI\CacheObject\IValues\InteractiveValueStruct.cs" /> <Compile Include="CacheObject\IValues\InteractiveValueStruct.cs" />
<Compile Include="UI\Models\InputFieldRef.cs" /> <Compile Include="UI\Models\InputFieldRef.cs" />
<Compile Include="UI\Pool.cs" /> <Compile Include="UI\Pool.cs" />
<Compile Include="UI\Panels\LogPanel.cs" /> <Compile Include="UI\Panels\LogPanel.cs" />
@ -318,8 +318,8 @@
<Compile Include="Core\Runtime\RuntimeContext.cs" /> <Compile Include="Core\Runtime\RuntimeContext.cs" />
<Compile Include="Core\Runtime\RuntimeProvider.cs" /> <Compile Include="Core\Runtime\RuntimeProvider.cs" />
<Compile Include="Core\Runtime\TextureUtilProvider.cs" /> <Compile Include="Core\Runtime\TextureUtilProvider.cs" />
<Compile Include="UI\ObjectExplorer\SceneHandler.cs" /> <Compile Include="ObjectExplorer\SceneHandler.cs" />
<Compile Include="UI\ObjectExplorer\SearchProvider.cs" /> <Compile Include="ObjectExplorer\SearchProvider.cs" />
<Compile Include="Core\Tests\TestClass.cs" /> <Compile Include="Core\Tests\TestClass.cs" />
<Compile Include="Core\Utility\UnityHelpers.cs" /> <Compile Include="Core\Utility\UnityHelpers.cs" />
<Compile Include="ExplorerCore.cs" /> <Compile Include="ExplorerCore.cs" />
@ -344,8 +344,8 @@
<Compile Include="UI\Widgets\AutoComplete\AutoCompleteModal.cs" /> <Compile Include="UI\Widgets\AutoComplete\AutoCompleteModal.cs" />
<Compile Include="UI\Widgets\AutoComplete\TypeCompleter.cs" /> <Compile Include="UI\Widgets\AutoComplete\TypeCompleter.cs" />
<Compile Include="UI\Models\ButtonRef.cs" /> <Compile Include="UI\Models\ButtonRef.cs" />
<Compile Include="UI\ObjectExplorer\ObjectSearch.cs" /> <Compile Include="ObjectExplorer\ObjectSearch.cs" />
<Compile Include="UI\ObjectExplorer\SceneExplorer.cs" /> <Compile Include="ObjectExplorer\SceneExplorer.cs" />
<Compile Include="UI\Widgets\ScrollPool\DataHeightCache.cs" /> <Compile Include="UI\Widgets\ScrollPool\DataHeightCache.cs" />
<Compile Include="UI\Widgets\ScrollPool\ICell.cs" /> <Compile Include="UI\Widgets\ScrollPool\ICell.cs" />
<Compile Include="UI\Widgets\ScrollPool\ICellPoolDataSource.cs" /> <Compile Include="UI\Widgets\ScrollPool\ICellPoolDataSource.cs" />