Compare commits

..

17 Commits

Author SHA1 Message Date
46f35129c5 3.2.10
* The following preferences are now persistent between sessions: Active Menu Page, Scene Explorer Hide State, Debug Console Hide State
* The "Resize Cursor" is now just a `↔` Text label instead of a sprite.
* Added support for Unity 5.2+ games (previously was only supporting 5.6)
2021-03-26 19:49:53 +11:00
604c499822 Add Reset button to C# Console 2021-03-26 07:31:30 +11:00
8964c48ba0 Move melon attributes to ExplorerMelonMod.cs 2021-03-26 06:38:59 +11:00
e85a3e0f1e Merge bepinex/melonloader unhollowed libs 2021-03-26 06:04:44 +11:00
c658d393f5 Update README.md 2021-03-26 05:59:17 +11:00
9a45e29e02 Update README.md 2021-03-26 05:53:03 +11:00
418ece55e3 Improve UI inspect-under-mouse 2021-03-26 05:43:53 +11:00
bf455893e7 Include all references in lib folder 2021-03-26 05:40:12 +11:00
6d9cb8205a Update README.md 2021-03-25 18:48:40 +11:00
0f431e997b Update README.md 2021-03-25 18:47:52 +11:00
2107df70ad Improvements to CS Console
* Errors are now logged properly.
* Can now define classes, methods, etc - no longer has to be an expression body.
* Added `StartCoroutine(IEnumerator routine)` helper method to easily run a Coroutine
* Disabling suggestions now properly stops Explorer trying to update suggestion cache instead of just not showing them. In the rare cases that suggestions cause a crash, disabling them will now prevent those crashes.
* Various other misc improvements behind the scenes
2021-03-25 18:39:35 +11:00
a9fbea7c96 (C# Console) Only update autocomplete and indent if they are enabled 2021-03-24 17:14:13 +11:00
77878ddd94 Use reflection for adding Unity log callback to avoid unstripping errors 2021-03-24 17:13:43 +11:00
594abc47f8 Move RuntimeProvider.Init to after config is loaded 2021-03-24 17:13:26 +11:00
5e326916a2 bump version 2021-03-23 16:16:09 +11:00
31c2debb78 fix typo mistake in previous version 2021-03-23 16:15:16 +11:00
d919497e43 Config: use en-us culture, fix recursive exception 2021-03-23 04:47:55 +11:00
57 changed files with 1329 additions and 849 deletions

View File

@ -18,7 +18,7 @@
- [How to install](#how-to-install)
- [Mod Config](#mod-config)
- [Building](#building)
- [Credits](#credits)
- [Acknowledgments](#acknowledgments)
## Releases
@ -46,6 +46,32 @@
* <b>C# Console</b>: Interactive console for evaluating C# methods on the fly, with some basic helpers.
* <b>Inspect-under-mouse</b>: Hover over an object with a collider and inspect it by clicking on it. There's also a UI mode to inspect UI objects.
### C# Console Tips
The C# Console can be used to define temporary classes and methods, or it can be used to evaluate an expression, but you cannot do both at the same time.
For example, you could run this code to define a temporary class (it will be visible within the console until you run `Reset();`).
```csharp
public class MyClass
{
public static void Method()
{
UnityExplorer.ExplorerCore.Log("hello");
}
}
```
You could then delete or comment out the class and run the following expression to run that method:
```csharp
MyClass.Method();
```
However, you cannot define a class and run it both at the same time. You must either define class(es) and run that, or define an expression and run that.
You can also make use of the helper methods in the console to simplify some tasks, which you can see listed when the console has nothing entered for input. These methods are **not** accessible within any temporary classes you define, they can only be used in the expression context.
## How to install
### BepInEx
@ -110,27 +136,21 @@ You can change the settings via the "Options" page of the main menu, or directly
## Building
If you'd like to build this yourself, all you need to do is download this repository and build from Visual Studio. If you want to build for BepInEx or MelonLoader IL2CPP then you will need to install the mod loader for a game and set the directory in the `csproj` file.
If you'd like to build this yourself, all you need to do is download this repository and build from Visual Studio.
For IL2CPP:
1. Install BepInEx or MelonLoader for your game.
2. Open the `src\UnityExplorer.csproj` file in a text editor.
3. Set `BIECppGameFolder` (for BepInEx) and/or `MLCppGameFolder` (for MelonLoader) so the project can locate the necessary references.
4. For Standalone builds, you can either install BepInEx for the game to build, or just change the .csproj file and set the Unhollower reference manually.
For all builds:
1. Open the `src\UnityExplorer.sln` project.
2. Select `Solution 'UnityExplorer' (1 of 1 project)` in the Solution Explorer panel, and set the <b>Active config</b> property to the version you want to build, then build it.
2. Select `Solution 'UnityExplorer' (1 of 1 project)` in the Solution Explorer panel, and set the <b>Active config</b> property to the version you want to build, then build it. Alternatively, use "Batch Build" and select all releases.
3. The DLLs are built to the `Release\` folder in the root of the repository.
4. If ILRepack fails or is missing, use the NuGet package manager to re-install `ILRepack.Lib.MSBuild.Task`, then re-build.
## Credits
The references are all inside the `lib\` folder, if you need to change them for some reason then you can replace them there.
Written by Sinai.
## Acknowledgments
### Licensing
* [ManlyMarco](https://github.com/ManlyMarco) for [Runtime Unity Editor](https://github.com/ManlyMarco/RuntimeUnityEditor) (GPL), snippets from the REPL Console were used for UnityExplorer's C# Console.
* [denikson](https://github.com/denikson) (aka Horse) for [mcs-unity](https://github.com/denikson/mcs-unity) (MIT), used as the `Mono.CSharp` reference for the C# Console.
* [HerpDerpenstine](https://github.com/HerpDerpinstine) for [MelonCoroutines](https://github.com/LavaGang/MelonLoader/blob/master/MelonLoader.Support.Il2Cpp/MelonCoroutines.cs) (Apache), they were included for standalone Il2CPP coroutine support.
* [InGameCodeEditor](https://assetstore.unity.com/packages/tools/gui/ingame-code-editor-144254) (Apache) was used as the base for the syntax highlighting for UnityExplorer's C# console (`UnityExplorer.UI.Main.CSConsole.Lexer`).
This project uses code from:
* (GPL) [ManlyMarco](https://github.com/ManlyMarco)'s [Runtime Unity Editor](https://github.com/ManlyMarco/RuntimeUnityEditor), which I used for some aspects of the C# Console and Auto-Complete features. The snippets I used are indicated with a comment.
* (MIT) [denikson](https://github.com/denikson) (aka Horse)'s [mcs-unity](https://github.com/denikson/mcs-unity). I commented out the `SkipVisibilityExt` constructor since it was causing an exception with the Hook it attempted in IL2CPP.
* (Apache) [InGameCodeEditor](https://assetstore.unity.com/packages/tools/gui/ingame-code-editor-144254) was used as the base for the syntax highlighting for UnityExplorer's C# console, although it has been heavily rewritten and optimized. Used classes are in the `UnityExplorer.UI.Main.CSConsole.Lexer` namespace.
### Disclaimer
UnityExplorer is in no way associated with Unity Technologies. "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere.

BIN
lib/UnhollowerBaseLib.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,29 @@
#if MONO
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace UnityExplorer.Core.CSharp
{
public class DummyBehaviour : MonoBehaviour
{
public static DummyBehaviour Instance;
public static void Setup()
{
var obj = new GameObject("Explorer_DummyBehaviour");
DontDestroyOnLoad(obj);
obj.hideFlags |= HideFlags.HideAndDontSave;
obj.AddComponent<DummyBehaviour>();
}
internal void Awake()
{
Instance = this;
}
}
}
#endif

View File

@ -15,11 +15,12 @@ namespace UnityExplorer.Core.CSharp
"mscorlib", "System.Core", "System", "System.Xml"
};
private readonly TextWriter tw;
internal static TextWriter _textWriter;
internal static StreamReportPrinter _reportPrinter;
public ScriptEvaluator(TextWriter tw) : base(BuildContext(tw))
{
this.tw = tw;
_textWriter = tw;
ImportAppdomainAssemblies(ReferenceAssembly);
AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad;
@ -28,23 +29,22 @@ namespace UnityExplorer.Core.CSharp
public void Dispose()
{
AppDomain.CurrentDomain.AssemblyLoad -= OnAssemblyLoad;
tw.Dispose();
_textWriter.Dispose();
}
private void OnAssemblyLoad(object sender, AssemblyLoadEventArgs args)
{
string name = args.LoadedAssembly.GetName().Name;
if (StdLib.Contains(name))
{
return;
}
ReferenceAssembly(args.LoadedAssembly);
}
private static CompilerContext BuildContext(TextWriter tw)
{
var reporter = new StreamReportPrinter(tw);
_reportPrinter = new StreamReportPrinter(tw);
var settings = new CompilerSettings
{
@ -56,7 +56,7 @@ namespace UnityExplorer.Core.CSharp
EnhancedWarnings = false
};
return new CompilerContext(settings, reporter);
return new CompilerContext(settings, _reportPrinter);
}
private static void ImportAppdomainAssemblies(Action<Assembly> import)

View File

@ -4,6 +4,11 @@ using UnityExplorer.UI;
using UnityExplorer.UI.Main;
using UnityExplorer.Core.Inspectors;
using UnityExplorer.UI.Main.CSConsole;
using System.Collections;
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
using UnityExplorer.Core.Runtime;
namespace UnityExplorer.Core.CSharp
{
@ -14,6 +19,11 @@ namespace UnityExplorer.Core.CSharp
ExplorerCore.Log(message);
}
public static void StartCoroutine(IEnumerator ienumerator)
{
RuntimeProvider.Instance.StartConsoleCoroutine(ienumerator);
}
public static void AddUsing(string directive)
{
CSharpConsole.Instance.AddUsing(directive);
@ -21,7 +31,7 @@ namespace UnityExplorer.Core.CSharp
public static void GetUsing()
{
ExplorerCore.Log(CSharpConsole.Instance.m_evaluator.GetUsing());
ExplorerCore.Log(CSharpConsole.Instance.Evaluator.GetUsing());
}
public static void Reset()

View File

@ -4,6 +4,9 @@ using UnityEngine;
using IniParser;
using IniParser.Parser;
using UnityExplorer.UI;
using System.Globalization;
using UnityExplorer.Core.Inspectors;
using UnityExplorer.UI.Main;
namespace UnityExplorer.Core.Config
{
@ -14,23 +17,21 @@ namespace UnityExplorer.Core.Config
internal static readonly IniDataParser _parser = new IniDataParser();
internal static readonly string INI_PATH = Path.Combine(ExplorerCore.Loader.ConfigFolder, "config.ini");
static ExplorerConfig()
{
_parser.Configuration.CommentString = "#";
PanelDragger.OnFinishResize += PanelDragger_OnFinishResize;
}
internal static CultureInfo _enCulture = new CultureInfo("en-US");
// Actual configs
public KeyCode Main_Menu_Toggle = KeyCode.F7;
public bool Force_Unlock_Mouse = true;
public int Default_Page_Limit = 25;
public string Default_Output_Path = Path.Combine(ExplorerCore.EXPLORER_FOLDER, "Output");
public bool Log_Unity_Debug = false;
public bool Hide_On_Startup = false;
public string Window_Anchors = DEFAULT_WINDOW_ANCHORS;
public KeyCode Main_Menu_Toggle = KeyCode.F7;
public bool Force_Unlock_Mouse = true;
public int Default_Page_Limit = 25;
public string Default_Output_Path = Path.Combine(ExplorerCore.EXPLORER_FOLDER, "Output");
public bool Log_Unity_Debug = false;
public bool Hide_On_Startup = false;
public string Window_Anchors = DEFAULT_WINDOW_ANCHORS;
public int Active_Tab = 0;
public bool DebugConsole_Hidden = false;
public bool SceneExplorer_Hidden = false;
private const string DEFAULT_WINDOW_ANCHORS = "0.25,0.1,0.78,0.95";
private const string DEFAULT_WINDOW_ANCHORS = "0.25,0.10,0.78,0.95";
public static event Action OnConfigChanged;
@ -42,6 +43,12 @@ namespace UnityExplorer.Core.Config
public static void OnLoad()
{
Instance = new ExplorerConfig();
_parser.Configuration.CommentString = "#";
PanelDragger.OnFinishResize += PanelDragger_OnFinishResize;
SceneExplorer.OnToggleShow += SceneExplorer_OnToggleShow;
DebugConsole.OnToggleShow += DebugConsole_OnToggleShow;
MainMenu.OnActiveTabChanged += MainMenu_OnActiveTabChanged;
if (LoadSettings())
return;
@ -83,6 +90,15 @@ namespace UnityExplorer.Core.Config
case nameof(Window_Anchors):
Instance.Window_Anchors = config.Value;
break;
case nameof(Active_Tab):
Instance.Active_Tab = int.Parse(config.Value);
break;
case nameof(DebugConsole_Hidden):
Instance.DebugConsole_Hidden = bool.Parse(config.Value);
break;
case nameof(SceneExplorer_Hidden):
Instance.SceneExplorer_Hidden = bool.Parse(config.Value);
break;
}
}
@ -96,13 +112,16 @@ namespace UnityExplorer.Core.Config
data.Sections.AddSection("Config");
var sec = data.Sections["Config"];
sec.AddKey(nameof(Main_Menu_Toggle), Instance.Main_Menu_Toggle.ToString());
sec.AddKey(nameof(Force_Unlock_Mouse), Instance.Force_Unlock_Mouse.ToString());
sec.AddKey(nameof(Default_Page_Limit), Instance.Default_Page_Limit.ToString());
sec.AddKey(nameof(Log_Unity_Debug), Instance.Log_Unity_Debug.ToString());
sec.AddKey(nameof(Default_Output_Path), Instance.Default_Output_Path);
sec.AddKey(nameof(Hide_On_Startup), Instance.Hide_On_Startup.ToString());
sec.AddKey(nameof(Window_Anchors), GetWindowAnchorsString());
sec.AddKey(nameof(Main_Menu_Toggle), Instance.Main_Menu_Toggle.ToString());
sec.AddKey(nameof(Force_Unlock_Mouse), Instance.Force_Unlock_Mouse.ToString());
sec.AddKey(nameof(Default_Page_Limit), Instance.Default_Page_Limit.ToString());
sec.AddKey(nameof(Log_Unity_Debug), Instance.Log_Unity_Debug.ToString());
sec.AddKey(nameof(Default_Output_Path), Instance.Default_Output_Path);
sec.AddKey(nameof(Hide_On_Startup), Instance.Hide_On_Startup.ToString());
sec.AddKey(nameof(Window_Anchors), GetWindowAnchorsString());
sec.AddKey(nameof(Active_Tab), Instance.Active_Tab.ToString());
sec.AddKey(nameof(DebugConsole_Hidden), Instance.DebugConsole_Hidden.ToString());
sec.AddKey(nameof(SceneExplorer_Hidden), Instance.SceneExplorer_Hidden.ToString());
if (!Directory.Exists(ExplorerCore.Loader.ConfigFolder))
Directory.CreateDirectory(ExplorerCore.Loader.ConfigFolder);
@ -110,6 +129,24 @@ namespace UnityExplorer.Core.Config
File.WriteAllText(INI_PATH, data.ToString());
}
private static void SceneExplorer_OnToggleShow()
{
Instance.SceneExplorer_Hidden = SceneExplorer.UI.Hiding;
SaveSettings();
}
private static void DebugConsole_OnToggleShow()
{
Instance.DebugConsole_Hidden = DebugConsole.Hiding;
SaveSettings();
}
private static void MainMenu_OnActiveTabChanged(int page)
{
Instance.Active_Tab = page;
SaveSettings();
}
// ============ Window Anchors specific stuff ============== //
private static void PanelDragger_OnFinishResize()
@ -123,17 +160,20 @@ namespace UnityExplorer.Core.Config
try
{
var split = Window_Anchors.Split(',');
if (split.Length != 4)
throw new Exception();
Vector4 ret = Vector4.zero;
ret.x = float.Parse(split[0]);
ret.y = float.Parse(split[1]);
ret.z = float.Parse(split[2]);
ret.w = float.Parse(split[3]);
ret.x = float.Parse(split[0], _enCulture);
ret.y = float.Parse(split[1], _enCulture);
ret.z = float.Parse(split[2], _enCulture);
ret.w = float.Parse(split[3], _enCulture);
return ret;
}
catch
{
Window_Anchors = DEFAULT_WINDOW_ANCHORS;
return GetWindowAnchorsVector();
return DefaultWindowAnchors();
}
}
@ -142,12 +182,24 @@ namespace UnityExplorer.Core.Config
try
{
var rect = PanelDragger.Instance.Panel;
return $"{rect.anchorMin.x},{rect.anchorMin.y},{rect.anchorMax.x},{rect.anchorMax.y}";
return string.Format(_enCulture, "{0},{1},{2},{3}", new object[]
{
rect.anchorMin.x,
rect.anchorMin.y,
rect.anchorMax.x,
rect.anchorMax.y
});
}
catch
{
return DEFAULT_WINDOW_ANCHORS;
}
}
internal static Vector4 DefaultWindowAnchors()
{
Instance.Window_Anchors = DEFAULT_WINDOW_ANCHORS;
return new Vector4(0.25f, 0.1f, 0.78f, 0.95f);
}
}
}

View File

@ -37,28 +37,40 @@ namespace UnityExplorer.Core.Inspectors
UI = new MouseInspectorUI();
}
public static void StartInspect()
private static readonly List<Graphic> _wasDisabledGraphics = new List<Graphic>();
private static readonly List<CanvasGroup> _wasDisabledCanvasGroups = new List<CanvasGroup>();
private static readonly List<GameObject> _objectsAddedCastersTo = new List<GameObject>();
public static void StartInspect(MouseInspectMode mode)
{
Mode = mode;
Enabled = true;
MainMenu.Instance.MainPanel.SetActive(false);
UI.s_UIContent.SetActive(true);
// recache Graphic Raycasters each time we start
var casters = RuntimeProvider.Instance.FindObjectsOfTypeAll(typeof(GraphicRaycaster));
m_gCasters = new GraphicRaycaster[casters.Length];
for (int i = 0; i < casters.Length; i++)
if (mode == MouseInspectMode.UI)
{
m_gCasters[i] = casters[i].Cast(typeof(GraphicRaycaster)) as GraphicRaycaster;
SetupUIRaycast();
}
}
internal static void ClearHitData()
{
s_lastHit = null;
UI.s_objNameLabel.text = "No hits...";
UI.s_objPathLabel.text = "";
}
public static void StopInspect()
{
Enabled = false;
MainMenu.Instance.MainPanel.SetActive(true);
UI.s_UIContent.SetActive(false);
if (Mode == MouseInspectMode.UI)
StopUIInspect();
ClearHitData();
}
@ -91,6 +103,18 @@ namespace UnityExplorer.Core.Inspectors
}
}
internal static void UpdatePosition(Vector2 mousePos)
{
s_lastMousePos = mousePos;
var inversePos = UIManager.CanvasRoot.transform.InverseTransformPoint(mousePos);
UI.s_mousePosLabel.text = $"<color=grey>Mouse Position:</color> {mousePos.ToString()}";
float yFix = mousePos.y < 120 ? 80 : -80;
UI.s_UIContent.transform.localPosition = new Vector3(inversePos.x, inversePos.y + yFix, 0);
}
internal static void OnHitGameObject(GameObject obj)
{
if (obj != s_lastHit)
@ -107,6 +131,8 @@ namespace UnityExplorer.Core.Inspectors
}
}
// Collider raycasting
internal static void RaycastWorld(Vector2 mousePos)
{
var ray = UnityHelper.MainCamera.ScreenPointToRay(mousePos);
@ -124,6 +150,54 @@ namespace UnityExplorer.Core.Inspectors
}
}
// UI Graphic raycasting
private static void SetupUIRaycast()
{
foreach (var obj in RuntimeProvider.Instance.FindObjectsOfTypeAll(typeof(Canvas)))
{
var canvas = obj.Cast(typeof(Canvas)) as Canvas;
if (!canvas || !canvas.enabled || !canvas.gameObject.activeInHierarchy)
continue;
if (!canvas.GetComponent<GraphicRaycaster>())
{
canvas.gameObject.AddComponent<GraphicRaycaster>();
//ExplorerCore.Log("Added raycaster to " + canvas.name);
_objectsAddedCastersTo.Add(canvas.gameObject);
}
}
// recache Graphic Raycasters each time we start
var casters = RuntimeProvider.Instance.FindObjectsOfTypeAll(typeof(GraphicRaycaster));
m_gCasters = new GraphicRaycaster[casters.Length];
for (int i = 0; i < casters.Length; i++)
{
m_gCasters[i] = casters[i].Cast(typeof(GraphicRaycaster)) as GraphicRaycaster;
}
// enable raycastTarget on Graphics
foreach (var obj in RuntimeProvider.Instance.FindObjectsOfTypeAll(typeof(Graphic)))
{
var graphic = obj.Cast(typeof(Graphic)) as Graphic;
if (!graphic || !graphic.enabled || graphic.raycastTarget || !graphic.gameObject.activeInHierarchy)
continue;
graphic.raycastTarget = true;
//ExplorerCore.Log("Enabled raycastTarget on " + graphic.name);
_wasDisabledGraphics.Add(graphic);
}
// enable blocksRaycasts on CanvasGroups
foreach (var obj in RuntimeProvider.Instance.FindObjectsOfTypeAll(typeof(CanvasGroup)))
{
var canvas = obj.Cast(typeof(CanvasGroup)) as CanvasGroup;
if (!canvas || !canvas.gameObject.activeInHierarchy || canvas.blocksRaycasts)
continue;
canvas.blocksRaycasts = true;
//ExplorerCore.Log("Enabled raycasts on " + canvas.name);
_wasDisabledCanvasGroups.Add(canvas);
}
}
internal static void RaycastUI(Vector2 mousePos)
{
var ped = new PointerEventData(null)
@ -136,6 +210,11 @@ namespace UnityExplorer.Core.Inspectors
#else
var list = new Il2CppSystem.Collections.Generic.List<RaycastResult>();
#endif
//ExplorerCore.Log("~~~~~~~~~ begin raycast ~~~~~~~~");
GameObject hitObject = null;
int highestLayer = int.MinValue;
int highestOrder = int.MinValue;
int highestDepth = int.MinValue;
foreach (var gr in m_gCasters)
{
gr.Raycast(ped, list);
@ -144,14 +223,40 @@ namespace UnityExplorer.Core.Inspectors
{
foreach (var hit in list)
{
if (hit.gameObject)
if (!hit.gameObject)
continue;
if (hit.gameObject.GetComponent<CanvasGroup>() is CanvasGroup group && group.alpha == 0)
continue;
if (hit.gameObject.GetComponent<Graphic>() is Graphic graphic && graphic.color.a == 0f)
continue;
//ExplorerCore.Log("Hit: " + hit.gameObject.name + ", depth: " + hit.depth + ", layer: " + hit.sortingLayer + ", order: " + hit.sortingOrder);
if (hit.sortingLayer < highestLayer)
continue;
if (hit.sortingLayer > highestLayer)
{
var obj = hit.gameObject;
OnHitGameObject(obj);
break;
highestLayer = hit.sortingLayer;
highestOrder = int.MinValue;
}
if (hit.depth < highestDepth)
continue;
if (hit.depth > highestDepth)
{
highestDepth = hit.depth;
highestOrder = int.MinValue;
}
if (hit.sortingOrder <= highestOrder)
continue;
highestOrder = hit.sortingOrder;
hitObject = hit.gameObject;
}
}
else
@ -160,25 +265,30 @@ namespace UnityExplorer.Core.Inspectors
ClearHitData();
}
}
if (hitObject)
OnHitGameObject(hitObject);
//ExplorerCore.Log("~~~~~~~~~ end raycast ~~~~~~~~");
}
internal static void UpdatePosition(Vector2 mousePos)
private static void StopUIInspect()
{
s_lastMousePos = mousePos;
foreach (var obj in _objectsAddedCastersTo)
{
if (obj.GetComponent<GraphicRaycaster>() is GraphicRaycaster raycaster)
GameObject.Destroy(raycaster);
}
var inversePos = UIManager.CanvasRoot.transform.InverseTransformPoint(mousePos);
foreach (var graphic in _wasDisabledGraphics)
graphic.raycastTarget = false;
UI.s_mousePosLabel.text = $"<color=grey>Mouse Position:</color> {mousePos.ToString()}";
foreach (var canvas in _wasDisabledCanvasGroups)
canvas.blocksRaycasts = false;
float yFix = mousePos.y < 120 ? 80 : -80;
UI.s_UIContent.transform.localPosition = new Vector3(inversePos.x, inversePos.y + yFix, 0);
}
internal static void ClearHitData()
{
s_lastHit = null;
UI.s_objNameLabel.text = "No hits...";
UI.s_objPathLabel.text = "";
_objectsAddedCastersTo.Clear();
_wasDisabledCanvasGroups.Clear();
_wasDisabledGraphics.Clear();
}
}
}

View File

@ -224,8 +224,8 @@ namespace UnityExplorer.Core.Inspectors.Reflection
var topGroup = topGroupObj.GetComponent<HorizontalLayoutGroup>();
topGroup.childForceExpandHeight = false;
topGroup.childForceExpandWidth = false;
topGroup.childControlHeight = true;
topGroup.childControlWidth = true;
topGroup.SetChildControlHeight(true);
topGroup.SetChildControlWidth(true);
topGroup.spacing = 10;
topGroup.padding.left = 3;
topGroup.padding.right = 3;
@ -243,8 +243,8 @@ namespace UnityExplorer.Core.Inspectors.Reflection
var leftGroup = m_leftGroup.GetComponent<HorizontalLayoutGroup>();
leftGroup.childForceExpandHeight = true;
leftGroup.childForceExpandWidth = false;
leftGroup.childControlHeight = true;
leftGroup.childControlWidth = true;
leftGroup.SetChildControlHeight(true);
leftGroup.SetChildControlWidth(true);
leftGroup.spacing = 4;
// member label
@ -278,8 +278,8 @@ namespace UnityExplorer.Core.Inspectors.Reflection
var rightGroup = m_rightGroup.GetComponent<VerticalLayoutGroup>();
rightGroup.childForceExpandHeight = true;
rightGroup.childForceExpandWidth = false;
rightGroup.childControlHeight = true;
rightGroup.childControlWidth = true;
rightGroup.SetChildControlHeight(true);
rightGroup.SetChildControlWidth(true);
rightGroup.spacing = 2;
rightGroup.padding.top = 4;
rightGroup.padding.bottom = 2;

View File

@ -92,9 +92,9 @@ namespace UnityExplorer.Core.Inspectors.Reflection
m_mainRect.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, 25);
var mainGroup = m_mainContent.GetComponent<VerticalLayoutGroup>();
mainGroup.childForceExpandWidth = true;
mainGroup.childControlWidth = true;
mainGroup.SetChildControlWidth(true);
mainGroup.childForceExpandHeight = true;
mainGroup.childControlHeight = true;
mainGroup.SetChildControlHeight(true);
var mainLayout = m_mainContent.AddComponent<LayoutElement>();
mainLayout.minHeight = 25;
mainLayout.flexibleHeight = 9999;

View File

@ -296,7 +296,7 @@ namespace UnityExplorer.Core.Inspectors.Reflection
var scrollGroup = m_listContent.GetComponent<VerticalLayoutGroup>();
scrollGroup.childForceExpandHeight = true;
scrollGroup.childControlHeight = true;
scrollGroup.SetChildControlHeight(true);
scrollGroup.spacing = 2;
scrollGroup.padding.top = 5;
scrollGroup.padding.left = 5;

View File

@ -270,7 +270,7 @@ namespace UnityExplorer.Core.Inspectors.Reflection
var scrollGroup = m_listContent.GetComponent<VerticalLayoutGroup>();
scrollGroup.childForceExpandHeight = true;
scrollGroup.childControlHeight = true;
scrollGroup.SetChildControlHeight(true);
scrollGroup.spacing = 2;
scrollGroup.padding.top = 5;
scrollGroup.padding.left = 5;

View File

@ -98,8 +98,8 @@ namespace UnityExplorer.Core.Inspectors.Reflection
var group = groupObj.GetComponent<VerticalLayoutGroup>();
group.childForceExpandHeight = true;
group.childForceExpandWidth = false;
group.childControlHeight = true;
group.childControlWidth = true;
group.SetChildControlHeight(true);
group.SetChildControlWidth(true);
group.padding.top = 3;
group.padding.left = 3;
group.padding.right = 3;

View File

@ -155,9 +155,9 @@ namespace UnityExplorer.Core.Inspectors.Reflection
hiddenLayout.flexibleWidth = 9000;
var hiddenGroup = m_hiddenObj.AddComponent<HorizontalLayoutGroup>();
hiddenGroup.childForceExpandWidth = true;
hiddenGroup.childControlWidth = true;
hiddenGroup.SetChildControlWidth(true);
hiddenGroup.childForceExpandHeight = true;
hiddenGroup.childControlHeight = true;
hiddenGroup.SetChildControlHeight(true);
var inputObj = UIFactory.CreateInputField(m_hiddenObj, 14, 3);
var inputLayout = inputObj.AddComponent<LayoutElement>();

View File

@ -308,9 +308,9 @@ namespace UnityExplorer.Core.Inspectors.Reflection
mainRect.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, 25);
var mainGroup = m_valueContent.GetComponent<HorizontalLayoutGroup>();
mainGroup.childForceExpandWidth = false;
mainGroup.childControlWidth = true;
mainGroup.SetChildControlWidth(true);
mainGroup.childForceExpandHeight = false;
mainGroup.childControlHeight = true;
mainGroup.SetChildControlHeight(true);
mainGroup.spacing = 4;
mainGroup.childAlignment = TextAnchor.UpperLeft;
var mainLayout = m_valueContent.AddComponent<LayoutElement>();

View File

@ -0,0 +1,156 @@
#if CPP
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnhollowerBaseLib;
using UnityEngine;
// CREDIT HerpDerpenstine
// https://github.com/LavaGang/MelonLoader/blob/master/MelonLoader.Support.Il2Cpp/MelonCoroutines.cs
namespace UnityExplorer.Core.Runtime.Il2Cpp
{
public static class Il2CppCoroutine
{
private struct CoroTuple
{
public object WaitCondition;
public IEnumerator Coroutine;
}
private static readonly List<CoroTuple> ourCoroutinesStore = new List<CoroTuple>();
private static readonly List<IEnumerator> ourNextFrameCoroutines = new List<IEnumerator>();
private static readonly List<IEnumerator> ourWaitForFixedUpdateCoroutines = new List<IEnumerator>();
private static readonly List<IEnumerator> ourWaitForEndOfFrameCoroutines = new List<IEnumerator>();
private static readonly List<IEnumerator> tempList = new List<IEnumerator>();
internal static object Start(IEnumerator routine)
{
if (routine != null) ProcessNextOfCoroutine(routine);
return routine;
}
internal static void Stop(IEnumerator enumerator)
{
if (ourNextFrameCoroutines.Contains(enumerator)) // the coroutine is running itself
ourNextFrameCoroutines.Remove(enumerator);
else
{
int coroTupleIndex = ourCoroutinesStore.FindIndex(c => c.Coroutine == enumerator);
if (coroTupleIndex != -1) // the coroutine is waiting for a subroutine
{
object waitCondition = ourCoroutinesStore[coroTupleIndex].WaitCondition;
if (waitCondition is IEnumerator waitEnumerator)
Stop(waitEnumerator);
ourCoroutinesStore.RemoveAt(coroTupleIndex);
}
}
}
private static void ProcessCoroList(List<IEnumerator> target)
{
if (target.Count == 0) return;
// use a temp list to make sure waits made during processing are not handled by same processing invocation
// additionally, a temp list reduces allocations compared to an array
tempList.AddRange(target);
target.Clear();
foreach (var enumerator in tempList) ProcessNextOfCoroutine(enumerator);
tempList.Clear();
}
internal static void Process()
{
for (var i = ourCoroutinesStore.Count - 1; i >= 0; i--)
{
var tuple = ourCoroutinesStore[i];
if (tuple.WaitCondition is WaitForSeconds waitForSeconds)
{
if ((waitForSeconds.m_Seconds -= Time.deltaTime) <= 0)
{
ourCoroutinesStore.RemoveAt(i);
ProcessNextOfCoroutine(tuple.Coroutine);
}
}
}
ProcessCoroList(ourNextFrameCoroutines);
}
internal static void ProcessWaitForFixedUpdate() => ProcessCoroList(ourWaitForFixedUpdateCoroutines);
internal static void ProcessWaitForEndOfFrame() => ProcessCoroList(ourWaitForEndOfFrameCoroutines);
private static void ProcessNextOfCoroutine(IEnumerator enumerator)
{
try
{
if (!enumerator.MoveNext()) // Run the next step of the coroutine. If it's done, restore the parent routine
{
var indices = ourCoroutinesStore.Select((it, idx) => (idx, it)).Where(it => it.it.WaitCondition == enumerator).Select(it => it.idx).ToList();
for (var i = indices.Count - 1; i >= 0; i--)
{
var index = indices[i];
ourNextFrameCoroutines.Add(ourCoroutinesStore[index].Coroutine);
ourCoroutinesStore.RemoveAt(index);
}
return;
}
}
catch (Exception e)
{
ExplorerCore.LogError(e.ToString());
Stop(FindOriginalCoro(enumerator)); // We want the entire coroutine hierachy to stop when an error happen
}
var next = enumerator.Current;
switch (next)
{
case null:
ourNextFrameCoroutines.Add(enumerator);
return;
case WaitForFixedUpdate _:
ourWaitForFixedUpdateCoroutines.Add(enumerator);
return;
case WaitForEndOfFrame _:
ourWaitForEndOfFrameCoroutines.Add(enumerator);
return;
case WaitForSeconds _:
break; // do nothing, this one is supported in Process
case Il2CppObjectBase il2CppObjectBase:
var nextAsEnumerator = il2CppObjectBase.TryCast<Il2CppSystem.Collections.IEnumerator>();
if (nextAsEnumerator != null) // il2cpp IEnumerator also handles CustomYieldInstruction
next = new Il2CppEnumeratorWrapper(nextAsEnumerator);
else
ExplorerCore.LogWarning($"Unknown coroutine yield object of type {il2CppObjectBase} for coroutine {enumerator}");
break;
}
ourCoroutinesStore.Add(new CoroTuple { WaitCondition = next, Coroutine = enumerator });
if (next is IEnumerator nextCoro)
ProcessNextOfCoroutine(nextCoro);
}
private static IEnumerator FindOriginalCoro(IEnumerator enumerator)
{
int index = ourCoroutinesStore.FindIndex(ct => ct.WaitCondition == enumerator);
if (index == -1)
return enumerator;
return FindOriginalCoro(ourCoroutinesStore[index].Coroutine);
}
private class Il2CppEnumeratorWrapper : IEnumerator
{
private readonly Il2CppSystem.Collections.IEnumerator il2cppEnumerator;
public Il2CppEnumeratorWrapper(Il2CppSystem.Collections.IEnumerator il2CppEnumerator) => il2cppEnumerator = il2CppEnumerator;
public bool MoveNext() => il2cppEnumerator.MoveNext();
public void Reset() => il2cppEnumerator.Reset();
public object Current => il2cppEnumerator.Current;
}
}
}
#endif

View File

@ -2,12 +2,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using BF = System.Reflection.BindingFlags;
using System.Text;
using UnhollowerBaseLib;
using UnhollowerRuntimeLib;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
using System.Collections;
using UnityEngine.UI;
namespace UnityExplorer.Core.Runtime.Il2Cpp
{
@ -21,14 +25,27 @@ namespace UnityExplorer.Core.Runtime.Il2Cpp
public override void SetupEvents()
{
Application.add_logMessageReceived(
new Action<string, string, LogType>(ExplorerCore.Instance.OnUnityLog));
try
{
//Application.add_logMessageReceived(new Action<string, string, LogType>(ExplorerCore.Instance.OnUnityLog));
//SceneManager.add_sceneLoaded(
// new Action<Scene, LoadSceneMode>(ExplorerCore.Instance.OnSceneLoaded1));
var logType = ReflectionUtility.GetTypeByName("UnityEngine.Application+LogCallback");
var castMethod = logType.GetMethod("op_Implicit", new[] { typeof(Action<string, string, LogType>) });
var addMethod = typeof(Application).GetMethod("add_logMessageReceived", BF.Static | BF.Public, null, new[] { logType }, null);
addMethod.Invoke(null, new[]
{
castMethod.Invoke(null, new[] { new Action<string, string, LogType>(ExplorerCore.Instance.OnUnityLog) })
});
}
catch
{
ExplorerCore.LogWarning("Exception setting up Unity log listener, make sure Unity libraries have been unstripped!");
}
}
//SceneManager.add_activeSceneChanged(
// new Action<Scene, Scene>(ExplorerCore.Instance.OnSceneLoaded2));
public override void StartConsoleCoroutine(IEnumerator routine)
{
Il2CppCoroutine.Start(routine);
}
internal delegate IntPtr d_LayerToName(int layer);
@ -91,7 +108,7 @@ namespace UnityExplorer.Core.Runtime.Il2Cpp
}
}
public static class UnityEventExtensions
public static class Il2CppExtensions
{
public static void AddListener(this UnityEvent action, Action listener)
{
@ -102,6 +119,9 @@ public static class UnityEventExtensions
{
action.AddListener(listener);
}
public static void SetChildControlHeight(this HorizontalOrVerticalLayoutGroup group, bool value) => group.childControlHeight = value;
public static void SetChildControlWidth(this HorizontalOrVerticalLayoutGroup group, bool value) => group.childControlWidth = value;
}
#endif

View File

@ -1,12 +1,15 @@
#if MONO
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using UnityExplorer.Core;
using UnityExplorer.Core.CSharp;
namespace UnityExplorer.Core.Runtime.Mono
{
@ -25,6 +28,11 @@ namespace UnityExplorer.Core.Runtime.Mono
//SceneManager.activeSceneChanged += ExplorerCore.Instance.OnSceneLoaded2;
}
public override void StartConsoleCoroutine(IEnumerator routine)
{
DummyBehaviour.Instance.StartCoroutine(routine);
}
public override string LayerToName(int layer)
=> LayerMask.LayerToName(layer);
@ -50,4 +58,32 @@ namespace UnityExplorer.Core.Runtime.Mono
}
}
public static class MonoExtensions
{
public static void Clear(this StringBuilder sb)
{
sb.Remove(0, sb.Length);
}
private static PropertyInfo pi_childControlHeight;
public static void SetChildControlHeight(this HorizontalOrVerticalLayoutGroup group, bool value)
{
if (pi_childControlHeight == null)
pi_childControlHeight = group.GetType().GetProperty("childControlHeight");
pi_childControlHeight?.SetValue(group, value, null);
}
private static PropertyInfo pi_childControlWidth;
public static void SetChildControlWidth(this HorizontalOrVerticalLayoutGroup group, bool value)
{
if (pi_childControlWidth == null)
pi_childControlWidth = group.GetType().GetProperty("childControlWidth");
pi_childControlWidth?.SetValue(group, value, null);
}
}
#endif

View File

@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -36,6 +37,8 @@ namespace UnityExplorer.Core.Runtime
public abstract void SetupEvents();
public abstract void StartConsoleCoroutine(IEnumerator routine);
// Unity API handlers
public abstract string LayerToName(int layer);

View File

@ -9,6 +9,7 @@ using UnityEngine.SceneManagement;
using UnityEngine.UI;
using UnityExplorer.Core.Runtime;
using UnityExplorer.UI.Main.Home;
using UnityExplorer.Core.Config;
namespace UnityExplorer.Core.Inspectors
{
@ -58,14 +59,15 @@ namespace UnityExplorer.Core.Inspectors
public void Init()
{
RefreshSceneSelector();
if (ExplorerConfig.Instance.SceneExplorer_Hidden)
UI.ToggleShow();
}
public void Update()
{
if (SceneExplorerUI.Hiding || Time.realtimeSinceStartup - m_timeOfLastSceneUpdate < UPDATE_INTERVAL)
{
if (UI.Hiding || Time.realtimeSinceStartup - m_timeOfLastSceneUpdate < UPDATE_INTERVAL)
return;
}
RefreshSceneSelector();

View File

@ -17,7 +17,7 @@ namespace UnityExplorer
public class ExplorerCore
{
public const string NAME = "UnityExplorer";
public const string VERSION = "3.2.5";
public const string VERSION = "3.2.10";
public const string AUTHOR = "Sinai";
public const string GUID = "com.sinai.unityexplorer";
@ -44,13 +44,13 @@ namespace UnityExplorer
Instance = this;
RuntimeProvider.Init();
if (!Directory.Exists(EXPLORER_FOLDER))
Directory.CreateDirectory(EXPLORER_FOLDER);
ExplorerConfig.OnLoad();
RuntimeProvider.Init();
InputManager.Init();
CursorUnlocker.Init();

View File

@ -2,6 +2,10 @@
using System;
using System.IO;
using MelonLoader;
using UnityExplorer;
[assembly: MelonInfo(typeof(ExplorerMelonMod), ExplorerCore.NAME, ExplorerCore.VERSION, ExplorerCore.AUTHOR)]
[assembly: MelonGame(null, null)]
namespace UnityExplorer
{

View File

@ -2,13 +2,6 @@
using System.Runtime.InteropServices;
using UnityExplorer;
#if ML
using MelonLoader;
[assembly: MelonInfo(typeof(ExplorerMelonMod), "UnityExplorer", ExplorerCore.VERSION, ExplorerCore.AUTHOR)]
[assembly: MelonGame(null, null)]
#endif
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.

Binary file not shown.

View File

@ -205,7 +205,7 @@ namespace UnityExplorer.UI.Main.CSConsole
{
// Credit ManylMarco
CSharpConsole.AutoCompletes.Clear();
string[] completions = CSharpConsole.Instance.m_evaluator.GetCompletions(input, out string prefix);
string[] completions = CSharpConsole.Instance.Evaluator.GetCompletions(input, out string prefix);
if (completions != null)
{
if (prefix == null)
@ -269,8 +269,8 @@ namespace UnityExplorer.UI.Main.CSConsole
mainRect.offsetMax = Vector2.zero;
var mainGroup = content.GetComponent<VerticalLayoutGroup>();
mainGroup.childControlHeight = false;
mainGroup.childControlWidth = true;
mainGroup.SetChildControlHeight(false);
mainGroup.SetChildControlWidth(true);
mainGroup.childForceExpandHeight = false;
mainGroup.childForceExpandWidth = true;

View File

@ -53,15 +53,10 @@ namespace UnityExplorer.UI.Main.CSConsole
"else", "equals", "false", "finally", "float", "for", "foreach", "from", "global", "goto", "group",
"if", "in", "int", "into", "is", "join", "let", "lock", "long", "new", "null", "object", "on", "orderby", "out",
"ref", "remove", "return", "sbyte", "select", "short", "sizeof", "stackalloc", "string",
"switch", "throw", "true", "try", "typeof", "uint", "ulong", "ushort", "var", "where", "while", "yield" }
};
public static KeywordMatch invalidKeywordMatcher = new KeywordMatch()
{
highlightColor = new Color(0.95f, 0.10f, 0.10f, 1.0f),
Keywords = new[] { "abstract", "async", "base", "class", "delegate", "enum", "explicit", "extern", "fixed", "get",
"implicit", "interface", "internal", "namespace", "operator", "override", "params", "private", "protected", "public",
"using", "partial", "readonly", "sealed", "set", "static", "struct", "this", "unchecked", "unsafe", "value", "virtual", "volatile", "void" }
"switch", "throw", "true", "try", "typeof", "uint", "ulong", "ushort", "var", "where", "while", "yield",
"abstract", "async", "base", "class", "delegate", "enum", "explicit", "extern", "fixed", "get",
"implicit", "interface", "internal", "namespace", "operator", "override", "params", "private", "protected", "public",
"using", "partial", "readonly", "sealed", "set", "static", "struct", "this", "unchecked", "unsafe", "value", "virtual", "volatile", "void"}
};
// ~~~~~~~ ctor ~~~~~~~
@ -78,7 +73,6 @@ namespace UnityExplorer.UI.Main.CSConsole
numberMatcher,
stringMatcher,
validKeywordMatcher,
invalidKeywordMatcher,
};
foreach (Matcher lexer in matchers)

View File

@ -12,6 +12,10 @@ using UnityEngine.UI;
using UnityExplorer.UI.Reusable;
using UnityExplorer.UI.Main.CSConsole;
using UnityExplorer.Core;
using UnityExplorer.Core.Unity;
#if CPP
using UnityExplorer.Core.Runtime.Il2Cpp;
#endif
namespace UnityExplorer.UI.Main.CSConsole
{
@ -21,8 +25,8 @@ namespace UnityExplorer.UI.Main.CSConsole
public static CSharpConsole Instance { get; private set; }
//public UI.CSConsole.CSharpConsole m_codeEditor;
public ScriptEvaluator m_evaluator;
public ScriptEvaluator Evaluator;
internal StringBuilder m_evalLogBuilder;
public static List<string> UsingDirectives;
@ -49,14 +53,13 @@ namespace UnityExplorer.UI.Main.CSConsole
InitConsole();
AutoCompleter.Init();
#if MONO
DummyBehaviour.Setup();
#endif
ResetConsole();
ResetConsole(false);
// Make sure compiler is supported on this platform
m_evaluator.Compile("");
foreach (string use in DefaultUsing)
AddUsing(use);
Evaluator.Compile("");
return true;
}
@ -74,10 +77,32 @@ namespace UnityExplorer.UI.Main.CSConsole
}
}
public void ResetConsole(bool log = true)
{
if (Evaluator != null)
Evaluator.Dispose();
m_evalLogBuilder = new StringBuilder();
Evaluator = new ScriptEvaluator(new StringWriter(m_evalLogBuilder)) { InteractiveBaseClass = typeof(ScriptInteraction) };
UsingDirectives = new List<string>();
foreach (string use in DefaultUsing)
AddUsing(use);
if (log)
ExplorerCore.Log($"C# Console reset. Using directives:\r\n{Evaluator.GetUsing()}");
}
public override void Update()
{
UpdateConsole();
AutoCompleter.Update();
#if CPP
Il2CppCoroutine.Process();
#endif
}
public void AddUsing(string asm)
@ -89,40 +114,34 @@ namespace UnityExplorer.UI.Main.CSConsole
}
}
public void Evaluate(string code, bool suppressWarning = false)
public void Evaluate(string code, bool supressLog = false)
{
m_evaluator.Compile(code, out Mono.CSharp.CompiledMethod compiled);
if (compiled == null)
try
{
if (!suppressWarning)
ExplorerCore.LogWarning("Unable to compile the code!");
Evaluator.Run(code);
string output = ScriptEvaluator._textWriter.ToString();
var outputSplit = output.Split('\n');
if (outputSplit.Length >= 2)
output = outputSplit[outputSplit.Length - 2];
m_evalLogBuilder.Clear();
if (ScriptEvaluator._reportPrinter.ErrorsCount > 0)
throw new FormatException($"Unable to compile the code. Evaluator's last output was:\r\n{output}");
if (!supressLog)
ExplorerCore.Log("Code executed successfully.");
}
else
catch (FormatException fex)
{
try
{
object ret = VoidType.Value;
compiled.Invoke(ref ret);
}
catch (Exception e)
{
if (!suppressWarning)
ExplorerCore.LogWarning($"Exception executing code: {e.GetType()}, {e.Message}\r\n{e.StackTrace}");
}
if (!supressLog)
ExplorerCore.LogWarning(fex.Message);
}
}
public void ResetConsole()
{
if (m_evaluator != null)
catch (Exception ex)
{
m_evaluator.Dispose();
if (!supressLog)
ExplorerCore.LogWarning(ex);
}
m_evaluator = new ScriptEvaluator(new StringWriter(new StringBuilder())) { InteractiveBaseClass = typeof(ScriptInteraction) };
UsingDirectives = new List<string>();
}
// =================================================================================================
@ -160,6 +179,8 @@ The following helper methods are available:
* <color=#add490>Log(""message"")</color> logs a message to the debug console
* <color=#add490>StartCoroutine(IEnumerator routine)</color> start the IEnumerator as a UnityEngine.Coroutine
* <color=#add490>CurrentTarget()</color> returns the currently inspected target on the Home page
* <color=#add490>AllTargets()</color> returns an object[] array containing all inspected instances
@ -284,14 +305,16 @@ The following helper methods are available:
return;
}
UpdateIndent(newText);
if (EnableAutoIndent)
UpdateIndent(newText);
if (!forceUpdate && string.IsNullOrEmpty(newText))
inputHighlightText.text = string.Empty;
else
inputHighlightText.text = SyntaxHighlightContent(newText);
UpdateAutocompletes();
if (EnableAutocompletes)
UpdateAutocompletes();
}
private void UpdateIndent(string newText)
@ -440,12 +463,12 @@ The following helper methods are available:
mainLayout.flexibleHeight = 9000;
var mainGroup = Content.AddComponent<VerticalLayoutGroup>();
mainGroup.childControlHeight = true;
mainGroup.childControlWidth = true;
mainGroup.SetChildControlHeight(true);
mainGroup.SetChildControlWidth(true);
mainGroup.childForceExpandHeight = true;
mainGroup.childForceExpandWidth = true;
#region TOP BAR
#region TOP BAR
// Main group object
@ -462,8 +485,8 @@ The following helper methods are available:
topBarGroup.spacing = 10;
topBarGroup.childForceExpandHeight = true;
topBarGroup.childForceExpandWidth = true;
topBarGroup.childControlWidth = true;
topBarGroup.childControlHeight = true;
topBarGroup.SetChildControlWidth(true);
topBarGroup.SetChildControlHeight(true);
topBarGroup.childAlignment = TextAnchor.LowerCenter;
var topBarLabel = UIFactory.CreateLabel(topBarObj, TextAnchor.MiddleLeft);
@ -521,9 +544,9 @@ The following helper methods are available:
autoIndentLayout.flexibleWidth = 0;
autoIndentLayout.minHeight = 25;
#endregion
#endregion
#region CONSOLE INPUT
#region CONSOLE INPUT
int fontSize = 16;
@ -554,9 +577,38 @@ The following helper methods are available:
#endregion
#region COMPILE BUTTON
#region COMPILE BUTTON BAR
var compileBtnObj = UIFactory.CreateButton(Content);
var horozGroupObj = UIFactory.CreateHorizontalGroup(Content, new Color(1, 1, 1, 0));
var horozGroup = horozGroupObj.GetComponent<HorizontalLayoutGroup>();
horozGroup.padding.left = 2;
horozGroup.padding.top = 2;
horozGroup.padding.right = 2;
horozGroup.padding.bottom = 2;
var resetBtnObj = UIFactory.CreateButton(horozGroupObj);
var resetBtnLayout = resetBtnObj.AddComponent<LayoutElement>();
resetBtnLayout.preferredWidth = 80;
resetBtnLayout.flexibleWidth = 0;
resetBtnLayout.minHeight = 45;
resetBtnLayout.flexibleHeight = 0;
var resetButton = resetBtnObj.GetComponent<Button>();
var resetBtnColors = resetButton.colors;
resetBtnColors.normalColor = "666666".ToColor();
resetButton.colors = resetBtnColors;
var resetBtnText = resetBtnObj.GetComponentInChildren<Text>();
resetBtnText.text = "Reset";
resetBtnText.fontSize = 18;
resetBtnText.color = Color.white;
// Set compile button callback now that we have the Input Field reference
resetButton.onClick.AddListener(ResetCallback);
void ResetCallback()
{
ResetConsole();
}
var compileBtnObj = UIFactory.CreateButton(horozGroupObj);
var compileBtnLayout = compileBtnObj.AddComponent<LayoutElement>();
compileBtnLayout.preferredWidth = 80;
compileBtnLayout.flexibleWidth = 0;

View File

@ -14,7 +14,7 @@ namespace UnityExplorer.UI.Main
{
public static DebugConsole Instance { get; private set; }
public static bool LogUnity { get; set; } = ExplorerConfig.Instance.Log_Unity_Debug;
public static bool LogUnity { get; set; }
//public static bool SaveToDisk { get; set; } = ModConfig.Instance.Save_Logs_To_Disk;
internal static StreamWriter s_streamWriter;
@ -32,9 +32,13 @@ namespace UnityExplorer.UI.Main
public DebugConsole(GameObject parent)
{
Instance = this;
LogUnity = ExplorerConfig.Instance.Log_Unity_Debug;
ConstructUI(parent);
if (ExplorerConfig.Instance.DebugConsole_Hidden)
ToggleShow();
// append messages that logged before we were set up
string preAppend = "";
for (int i = s_preInitMessages.Count - 1; i >= 0; i--)
@ -48,9 +52,6 @@ namespace UnityExplorer.UI.Main
// set up IO
//if (!SaveToDisk)
// return;
var path = ExplorerCore.EXPLORER_FOLDER + @"\Logs";
if (!Directory.Exists(path))
@ -80,6 +81,34 @@ namespace UnityExplorer.UI.Main
s_streamWriter.WriteLine(msg);
}
public static bool Hiding;
private GameObject m_logAreaObj;
private Text m_hideBtnText;
private LayoutElement m_mainLayout;
public static Action OnToggleShow;
public void ToggleShow()
{
if (m_logAreaObj.activeSelf)
{
Hiding = true;
m_logAreaObj.SetActive(false);
m_hideBtnText.text = "Show";
m_mainLayout.minHeight = 30;
}
else
{
Hiding = false;
m_logAreaObj.SetActive(true);
m_hideBtnText.text = "Hide";
m_mainLayout.minHeight = 190;
}
OnToggleShow?.Invoke();
}
public static string RemoveInvalidFilenameChars(string s)
{
var invalid = Path.GetInvalidFileNameChars();
@ -129,8 +158,8 @@ namespace UnityExplorer.UI.Main
var mainObj = UIFactory.CreateVerticalGroup(parent, new Color(0.1f, 0.1f, 0.1f, 1.0f));
var mainGroup = mainObj.GetComponent<VerticalLayoutGroup>();
mainGroup.childControlHeight = true;
mainGroup.childControlWidth = true;
mainGroup.SetChildControlHeight(true);
mainGroup.SetChildControlWidth(true);
mainGroup.childForceExpandHeight = true;
mainGroup.childForceExpandWidth = true;
@ -140,23 +169,23 @@ namespace UnityExplorer.UI.Main
var mask = mainObj.AddComponent<Mask>();
mask.showMaskGraphic = true;
var mainLayout = mainObj.AddComponent<LayoutElement>();
mainLayout.minHeight = 190;
mainLayout.flexibleHeight = 0;
m_mainLayout = mainObj.AddComponent<LayoutElement>();
m_mainLayout.minHeight = 190;
m_mainLayout.flexibleHeight = 0;
#region LOG AREA
var logAreaObj = UIFactory.CreateHorizontalGroup(mainObj);
var logAreaGroup = logAreaObj.GetComponent<HorizontalLayoutGroup>();
logAreaGroup.childControlHeight = true;
logAreaGroup.childControlWidth = true;
m_logAreaObj = UIFactory.CreateHorizontalGroup(mainObj);
var logAreaGroup = m_logAreaObj.GetComponent<HorizontalLayoutGroup>();
logAreaGroup.SetChildControlHeight(true);
logAreaGroup.SetChildControlWidth(true);
logAreaGroup.childForceExpandHeight = true;
logAreaGroup.childForceExpandWidth = true;
var logAreaLayout = logAreaObj.AddComponent<LayoutElement>();
var logAreaLayout = m_logAreaObj.AddComponent<LayoutElement>();
logAreaLayout.preferredHeight = 190;
logAreaLayout.flexibleHeight = 0;
var inputScrollerObj = UIFactory.CreateSrollInputField(logAreaObj, out InputFieldScroller inputScroll, 14, new Color(0.05f, 0.05f, 0.05f));
var inputScrollerObj = UIFactory.CreateSrollInputField(m_logAreaObj, out InputFieldScroller inputScroll, 14, new Color(0.05f, 0.05f, 0.05f));
inputScroll.inputField.textComponent.font = UIManager.ConsoleFont;
inputScroll.inputField.readOnly = true;
@ -179,8 +208,8 @@ namespace UnityExplorer.UI.Main
bottomGroup.spacing = 10;
bottomGroup.childForceExpandHeight = true;
bottomGroup.childForceExpandWidth = false;
bottomGroup.childControlWidth = true;
bottomGroup.childControlHeight = true;
bottomGroup.SetChildControlWidth(true);
bottomGroup.SetChildControlHeight(true);
bottomGroup.childAlignment = TextAnchor.MiddleLeft;
// Debug Console label
@ -198,26 +227,15 @@ namespace UnityExplorer.UI.Main
var hideButtonObj = UIFactory.CreateButton(bottomBarObj);
var hideBtnText = hideButtonObj.GetComponentInChildren<Text>();
hideBtnText.text = "Hide";
m_hideBtnText = hideButtonObj.GetComponentInChildren<Text>();
m_hideBtnText.text = "Hide";
var hideButton = hideButtonObj.GetComponent<Button>();
hideButton.onClick.AddListener(HideCallback);
void HideCallback()
{
if (logAreaObj.activeSelf)
{
logAreaObj.SetActive(false);
hideBtnText.text = "Show";
mainLayout.minHeight = 30;
}
else
{
logAreaObj.SetActive(true);
hideBtnText.text = "Hide";
mainLayout.minHeight = 190;
}
ToggleShow();
}
var hideBtnColors = hideButton.colors;

View File

@ -47,8 +47,8 @@ namespace UnityExplorer.UI.Main
mainGroup.spacing = 3;
mainGroup.childForceExpandHeight = true;
mainGroup.childForceExpandWidth = true;
mainGroup.childControlHeight = true;
mainGroup.childControlWidth = true;
mainGroup.SetChildControlHeight(true);
mainGroup.SetChildControlWidth(true);
}
}
}

View File

@ -43,8 +43,8 @@ namespace UnityExplorer.UI.Main.Home
var mainGroup = mainObj.GetComponent<VerticalLayoutGroup>();
mainGroup.childForceExpandHeight = true;
mainGroup.childForceExpandWidth = true;
mainGroup.childControlHeight = true;
mainGroup.childControlWidth = true;
mainGroup.SetChildControlHeight(true);
mainGroup.SetChildControlWidth(true);
mainGroup.spacing = 4;
mainGroup.padding.left = 4;
mainGroup.padding.right = 4;
@ -54,9 +54,9 @@ namespace UnityExplorer.UI.Main.Home
var topRowObj = UIFactory.CreateHorizontalGroup(mainObj, new Color(1, 1, 1, 0));
var topRowGroup = topRowObj.GetComponent<HorizontalLayoutGroup>();
topRowGroup.childForceExpandWidth = false;
topRowGroup.childControlWidth = true;
topRowGroup.SetChildControlWidth(true);
topRowGroup.childForceExpandHeight = true;
topRowGroup.childControlHeight = true;
topRowGroup.SetChildControlHeight(true);
topRowGroup.spacing = 15;
var inspectorTitle = UIFactory.CreateLabel(topRowObj, TextAnchor.MiddleLeft);
@ -87,15 +87,15 @@ namespace UnityExplorer.UI.Main.Home
var inspectorGroup = m_inspectorContent.GetComponent<VerticalLayoutGroup>();
inspectorGroup.childForceExpandHeight = true;
inspectorGroup.childForceExpandWidth = true;
inspectorGroup.childControlHeight = true;
inspectorGroup.childControlWidth = true;
inspectorGroup.SetChildControlHeight(true);
inspectorGroup.SetChildControlWidth(true);
m_inspectorContent = UIFactory.CreateVerticalGroup(mainObj, new Color(0.1f, 0.1f, 0.1f));
var contentGroup = m_inspectorContent.GetComponent<VerticalLayoutGroup>();
contentGroup.childForceExpandHeight = true;
contentGroup.childForceExpandWidth = true;
contentGroup.childControlHeight = true;
contentGroup.childControlWidth = true;
contentGroup.SetChildControlHeight(true);
contentGroup.SetChildControlWidth(true);
contentGroup.padding.top = 2;
contentGroup.padding.left = 2;
contentGroup.padding.right = 2;
@ -114,8 +114,8 @@ namespace UnityExplorer.UI.Main.Home
var invisGroup = invisObj.GetComponent<HorizontalLayoutGroup>();
invisGroup.childForceExpandWidth = false;
invisGroup.childForceExpandHeight = false;
invisGroup.childControlWidth = true;
invisGroup.childControlHeight = true;
invisGroup.SetChildControlWidth(true);
invisGroup.SetChildControlHeight(true);
invisGroup.padding.top = 2;
invisGroup.padding.bottom = 2;
invisGroup.padding.left = 2;
@ -150,8 +150,7 @@ namespace UnityExplorer.UI.Main.Home
void OnInspectMouseClicked()
{
InspectUnderMouse.Mode = mode;
InspectUnderMouse.StartInspect();
InspectUnderMouse.StartInspect(mode);
}
}

View File

@ -143,7 +143,7 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var vertGroup = vertGroupObj.GetComponent<VerticalLayoutGroup>();
vertGroup.childForceExpandHeight = true;
vertGroup.childForceExpandWidth = false;
vertGroup.childControlWidth = true;
vertGroup.SetChildControlWidth(true);
vertGroup.spacing = 5;
var vertLayout = vertGroupObj.AddComponent<LayoutElement>();
vertLayout.minWidth = 120;
@ -175,9 +175,9 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
GameObject btnGroupObj = UIFactory.CreateHorizontalGroup(s_childListContent, new Color(0.07f, 0.07f, 0.07f));
HorizontalLayoutGroup btnGroup = btnGroupObj.GetComponent<HorizontalLayoutGroup>();
btnGroup.childForceExpandWidth = true;
btnGroup.childControlWidth = true;
btnGroup.SetChildControlWidth(true);
btnGroup.childForceExpandHeight = false;
btnGroup.childControlHeight = true;
btnGroup.SetChildControlHeight(true);
LayoutElement btnLayout = btnGroupObj.AddComponent<LayoutElement>();
btnLayout.flexibleWidth = 320;
btnLayout.minHeight = 25;

View File

@ -145,7 +145,7 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var vertGroup = vertGroupObj.GetComponent<VerticalLayoutGroup>();
vertGroup.childForceExpandHeight = true;
vertGroup.childForceExpandWidth = false;
vertGroup.childControlWidth = true;
vertGroup.SetChildControlWidth(true);
vertGroup.spacing = 5;
var vertLayout = vertGroupObj.AddComponent<LayoutElement>();
vertLayout.minWidth = 120;
@ -178,9 +178,9 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
GameObject groupObj = UIFactory.CreateHorizontalGroup(s_compListContent, new Color(0.07f, 0.07f, 0.07f));
HorizontalLayoutGroup group = groupObj.GetComponent<HorizontalLayoutGroup>();
group.childForceExpandWidth = true;
group.childControlWidth = true;
group.SetChildControlWidth(true);
group.childForceExpandHeight = false;
group.childControlHeight = true;
group.SetChildControlHeight(true);
group.childAlignment = TextAnchor.MiddleLeft;
LayoutElement groupLayout = groupObj.AddComponent<LayoutElement>();
groupLayout.minWidth = 25;

View File

@ -247,7 +247,7 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var controlsObj = UIFactory.CreateVerticalGroup(parent, new Color(0.07f, 0.07f, 0.07f));
var controlsGroup = controlsObj.GetComponent<VerticalLayoutGroup>();
controlsGroup.childForceExpandWidth = false;
controlsGroup.childControlWidth = true;
controlsGroup.SetChildControlWidth(true);
controlsGroup.childForceExpandHeight = false;
controlsGroup.spacing = 5;
controlsGroup.padding.top = 4;
@ -260,9 +260,9 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var topRow = UIFactory.CreateHorizontalGroup(controlsObj, new Color(1, 1, 1, 0));
var topRowGroup = topRow.GetComponent<HorizontalLayoutGroup>();
topRowGroup.childForceExpandWidth = false;
topRowGroup.childControlWidth = true;
topRowGroup.SetChildControlWidth(true);
topRowGroup.childForceExpandHeight = false;
topRowGroup.childControlHeight = true;
topRowGroup.SetChildControlHeight(true);
topRowGroup.spacing = 5;
var hideButtonObj = UIFactory.CreateButton(topRow);
@ -292,10 +292,10 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var contentObj = UIFactory.CreateVerticalGroup(controlsObj, new Color(1, 1, 1, 0));
var contentGroup = contentObj.GetComponent<VerticalLayoutGroup>();
contentGroup.childForceExpandHeight = false;
contentGroup.childControlHeight = true;
contentGroup.SetChildControlHeight(true);
contentGroup.spacing = 5;
contentGroup.childForceExpandWidth = true;
contentGroup.childControlWidth = true;
contentGroup.SetChildControlWidth(true);
// ~~ add hide button callback now that we have scroll reference ~~
hideButton.onClick.AddListener(OnHideClicked);
@ -334,9 +334,9 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var setParentGroupObj = UIFactory.CreateHorizontalGroup(contentObj, new Color(1, 1, 1, 0));
var setParentGroup = setParentGroupObj.GetComponent<HorizontalLayoutGroup>();
setParentGroup.childForceExpandHeight = false;
setParentGroup.childControlHeight = true;
setParentGroup.SetChildControlHeight(true);
setParentGroup.childForceExpandWidth = false;
setParentGroup.childControlWidth = true;
setParentGroup.SetChildControlWidth(true);
setParentGroup.spacing = 5;
var setParentLayout = setParentGroupObj.AddComponent<LayoutElement>();
setParentLayout.minHeight = 25;
@ -380,9 +380,9 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var topBarObj = UIFactory.CreateHorizontalGroup(parent, new Color(1, 1, 1, 0));
var topGroup = topBarObj.GetComponent<HorizontalLayoutGroup>();
topGroup.childForceExpandWidth = false;
topGroup.childControlWidth = true;
topGroup.SetChildControlWidth(true);
topGroup.childForceExpandHeight = false;
topGroup.childControlHeight = true;
topGroup.SetChildControlHeight(true);
topGroup.spacing = 5;
var topLayout = topBarObj.AddComponent<LayoutElement>();
topLayout.minHeight = 25;
@ -462,9 +462,9 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var rowObject = UIFactory.CreateHorizontalGroup(parent, new Color(1, 1, 1, 0));
var rowGroup = rowObject.GetComponent<HorizontalLayoutGroup>();
rowGroup.childForceExpandWidth = false;
rowGroup.childControlWidth = true;
rowGroup.SetChildControlWidth(true);
rowGroup.childForceExpandHeight = false;
rowGroup.childControlHeight = true;
rowGroup.SetChildControlHeight(true);
rowGroup.spacing = 5;
var rowLayout = rowObject.AddComponent<LayoutElement>();
rowLayout.minHeight = 25;
@ -500,9 +500,9 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var inputHolder = UIFactory.CreateVerticalGroup(rowObject, new Color(1, 1, 1, 0));
var inputHolderGroup = inputHolder.GetComponent<VerticalLayoutGroup>();
inputHolderGroup.childForceExpandHeight = false;
inputHolderGroup.childControlHeight = true;
inputHolderGroup.SetChildControlHeight(true);
inputHolderGroup.childForceExpandWidth = false;
inputHolderGroup.childControlWidth = true;
inputHolderGroup.SetChildControlWidth(true);
var inputObj = UIFactory.CreateInputField(inputHolder);
var input = inputObj.GetComponent<InputField>();
@ -556,7 +556,7 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var bottomRow = UIFactory.CreateHorizontalGroup(contentObj, new Color(1, 1, 1, 0));
var bottomGroup = bottomRow.GetComponent<HorizontalLayoutGroup>();
bottomGroup.childForceExpandWidth = true;
bottomGroup.childControlWidth = true;
bottomGroup.SetChildControlWidth(true);
bottomGroup.spacing = 4;
var bottomLayout = bottomRow.AddComponent<LayoutElement>();
bottomLayout.minHeight = 25;

View File

@ -141,15 +141,15 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var parentLayout = scrollContent.transform.parent.gameObject.AddComponent<VerticalLayoutGroup>();
parentLayout.childForceExpandWidth = true;
parentLayout.childControlWidth = true;
parentLayout.SetChildControlWidth(true);
parentLayout.childForceExpandHeight = true;
parentLayout.childControlHeight = true;
parentLayout.SetChildControlHeight(true);
var scrollGroup = scrollContent.GetComponent<VerticalLayoutGroup>();
scrollGroup.childForceExpandHeight = true;
scrollGroup.childControlHeight = true;
scrollGroup.SetChildControlHeight(true);
scrollGroup.childForceExpandWidth = true;
scrollGroup.childControlWidth = true;
scrollGroup.SetChildControlWidth(true);
scrollGroup.spacing = 5;
var contentFitter = scrollContent.GetComponent<ContentSizeFitter>();
contentFitter.verticalFit = ContentSizeFitter.FitMode.Unconstrained;
@ -175,8 +175,8 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var pathGroup = m_pathGroupObj.GetComponent<HorizontalLayoutGroup>();
pathGroup.childForceExpandHeight = false;
pathGroup.childForceExpandWidth = false;
pathGroup.childControlHeight = false;
pathGroup.childControlWidth = true;
pathGroup.SetChildControlHeight(false);
pathGroup.SetChildControlWidth(true);
pathGroup.spacing = 5;
var pathRect = m_pathGroupObj.GetComponent<RectTransform>();
pathRect.sizeDelta = new Vector2(pathRect.sizeDelta.x, 20);
@ -215,9 +215,9 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
hiddenLayout.flexibleWidth = 9000;
var hiddenGroup = pathHiddenTextObj.AddComponent<HorizontalLayoutGroup>();
hiddenGroup.childForceExpandWidth = true;
hiddenGroup.childControlWidth = true;
hiddenGroup.SetChildControlWidth(true);
hiddenGroup.childForceExpandHeight = true;
hiddenGroup.childControlHeight = true;
hiddenGroup.SetChildControlHeight(true);
var pathInputObj = UIFactory.CreateInputField(pathHiddenTextObj);
var pathInputRect = pathInputObj.GetComponent<RectTransform>();
@ -246,8 +246,8 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var nameGroup = nameRowObj.GetComponent<HorizontalLayoutGroup>();
nameGroup.childForceExpandHeight = false;
nameGroup.childForceExpandWidth = false;
nameGroup.childControlHeight = true;
nameGroup.childControlWidth = true;
nameGroup.SetChildControlHeight(true);
nameGroup.SetChildControlWidth(true);
nameGroup.spacing = 5;
var nameRect = nameRowObj.GetComponent<RectTransform>();
nameRect.sizeDelta = new Vector2(nameRect.sizeDelta.x, 25);
@ -311,7 +311,7 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var sceneLayerRow = UIFactory.CreateHorizontalGroup(scrollContent, new Color(0.1f, 0.1f, 0.1f));
var sceneLayerGroup = sceneLayerRow.GetComponent<HorizontalLayoutGroup>();
sceneLayerGroup.childForceExpandWidth = false;
sceneLayerGroup.childControlWidth = true;
sceneLayerGroup.SetChildControlWidth(true);
sceneLayerGroup.spacing = 5;
var layerLabel = UIFactory.CreateLabel(sceneLayerRow, TextAnchor.MiddleCenter);
@ -363,9 +363,9 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var midGroup = midGroupObj.GetComponent<HorizontalLayoutGroup>();
midGroup.spacing = 5;
midGroup.childForceExpandWidth = true;
midGroup.childControlWidth = true;
midGroup.SetChildControlWidth(true);
midGroup.childForceExpandHeight = true;
midGroup.childControlHeight = true;
midGroup.SetChildControlHeight(true);
var midLayout = midGroupObj.AddComponent<LayoutElement>();
midLayout.minHeight = 300;

View File

@ -21,7 +21,7 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var tabGroupObj = UIFactory.CreateHorizontalGroup(tabContent);
var tabGroup = tabGroupObj.GetComponent<HorizontalLayoutGroup>();
tabGroup.childForceExpandWidth = true;
tabGroup.childControlWidth = true;
tabGroup.SetChildControlWidth(true);
var tabLayout = tabGroupObj.AddComponent<LayoutElement>();
tabLayout.minWidth = 185;
tabLayout.flexibleWidth = 0;

View File

@ -28,7 +28,7 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var rowObj = UIFactory.CreateHorizontalGroup(Parent.ReflectionUI.Content, new Color(0.1f, 0.1f, 0.1f));
var rowGroup = rowObj.GetComponent<HorizontalLayoutGroup>();
rowGroup.childForceExpandWidth = true;
rowGroup.childControlWidth = true;
rowGroup.SetChildControlWidth(true);
rowGroup.spacing = 5;
rowGroup.padding.top = 2;
rowGroup.padding.bottom = 2;
@ -137,8 +137,8 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var viewerGroup = scrollContent.GetComponent<VerticalLayoutGroup>();
viewerGroup.childForceExpandHeight = false;
viewerGroup.childForceExpandWidth = false;
viewerGroup.childControlHeight = true;
viewerGroup.childControlWidth = true;
viewerGroup.SetChildControlHeight(true);
viewerGroup.SetChildControlWidth(true);
var mainLayout = textureViewerObj.GetComponent<LayoutElement>();
mainLayout.flexibleHeight = 9999;
mainLayout.flexibleWidth = 9999;
@ -275,8 +275,8 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var memFilterGroup = memberFilterRowObj.GetComponent<HorizontalLayoutGroup>();
memFilterGroup.childForceExpandHeight = false;
memFilterGroup.childForceExpandWidth = false;
memFilterGroup.childControlWidth = true;
memFilterGroup.childControlHeight = true;
memFilterGroup.SetChildControlWidth(true);
memFilterGroup.SetChildControlHeight(true);
memFilterGroup.spacing = 5;
var memFilterLayout = memberFilterRowObj.AddComponent<LayoutElement>();
memFilterLayout.minHeight = 25;

View File

@ -53,8 +53,8 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var mainGroup = Content.GetComponent<VerticalLayoutGroup>();
mainGroup.childForceExpandHeight = false;
mainGroup.childForceExpandWidth = true;
mainGroup.childControlHeight = true;
mainGroup.childControlWidth = true;
mainGroup.SetChildControlHeight(true);
mainGroup.SetChildControlWidth(true);
mainGroup.spacing = 5;
mainGroup.padding.top = 4;
mainGroup.padding.left = 4;
@ -72,8 +72,8 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var nameRow = nameRowObj.GetComponent<HorizontalLayoutGroup>();
nameRow.childForceExpandWidth = true;
nameRow.childForceExpandHeight = true;
nameRow.childControlHeight = true;
nameRow.childControlWidth = true;
nameRow.SetChildControlHeight(true);
nameRow.SetChildControlWidth(true);
nameRow.padding.top = 2;
var nameRowLayout = nameRowObj.AddComponent<LayoutElement>();
nameRowLayout.minHeight = 25;
@ -120,8 +120,8 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var filterGroup = filterAreaObj.GetComponent<VerticalLayoutGroup>();
filterGroup.childForceExpandWidth = true;
filterGroup.childForceExpandHeight = true;
filterGroup.childControlWidth = true;
filterGroup.childControlHeight = true;
filterGroup.SetChildControlWidth(true);
filterGroup.SetChildControlHeight(true);
filterGroup.spacing = 4;
filterGroup.padding.left = 4;
filterGroup.padding.right = 4;
@ -136,8 +136,8 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var nameFilterGroup = nameFilterRowObj.GetComponent<HorizontalLayoutGroup>();
nameFilterGroup.childForceExpandHeight = false;
nameFilterGroup.childForceExpandWidth = false;
nameFilterGroup.childControlWidth = true;
nameFilterGroup.childControlHeight = true;
nameFilterGroup.SetChildControlWidth(true);
nameFilterGroup.SetChildControlHeight(true);
nameFilterGroup.spacing = 5;
var nameFilterLayout = nameFilterRowObj.AddComponent<LayoutElement>();
nameFilterLayout.minHeight = 25;
@ -168,8 +168,8 @@ namespace UnityExplorer.UI.Main.Home.Inspectors
var memFilterGroup = memberFilterRowObj.GetComponent<HorizontalLayoutGroup>();
memFilterGroup.childForceExpandHeight = false;
memFilterGroup.childForceExpandWidth = false;
memFilterGroup.childControlWidth = true;
memFilterGroup.childControlHeight = true;
memFilterGroup.SetChildControlWidth(true);
memFilterGroup.SetChildControlHeight(true);
memFilterGroup.spacing = 5;
var memFilterLayout = memberFilterRowObj.AddComponent<LayoutElement>();
memFilterLayout.minHeight = 25;

View File

@ -12,7 +12,14 @@ namespace UnityExplorer.UI.Main.Home
{
public class SceneExplorerUI
{
internal static bool Hiding;
public static SceneExplorerUI Instance;
public SceneExplorerUI()
{
Instance = this;
}
internal bool Hiding;
private Dropdown m_sceneDropdown;
private Text m_sceneDropdownText;
@ -27,6 +34,46 @@ namespace UnityExplorer.UI.Main.Home
internal readonly List<GameObject> m_shortList = new List<GameObject>();
private Text hideText;
private GameObject m_titleObj;
private GameObject m_sceneDropdownObj;
private GameObject m_scenePathGroupObj;
private GameObject m_scrollObj;
private LayoutElement m_leftLayout;
public void ToggleShow()
{
if (!Hiding)
{
Hiding = true;
hideText.text = "►";
m_titleObj.SetActive(false);
m_sceneDropdownObj.SetActive(false);
m_scenePathGroupObj.SetActive(false);
m_scrollObj.SetActive(false);
m_pageHandler.Hide();
m_leftLayout.minWidth = 15;
}
else
{
Hiding = false;
hideText.text = "Hide Scene Explorer";
m_titleObj.SetActive(true);
m_sceneDropdownObj.SetActive(true);
m_scenePathGroupObj.SetActive(true);
m_scrollObj.SetActive(true);
m_leftLayout.minWidth = 350;
SceneExplorer.Instance.Update();
}
SceneExplorer.InvokeOnToggleShow();
}
public void OnActiveScenesChanged(List<string> newNames)
{
m_sceneDropdown.options.Clear();
@ -160,9 +207,9 @@ namespace UnityExplorer.UI.Main.Home
public void ConstructScenePane()
{
GameObject leftPane = UIFactory.CreateVerticalGroup(HomePage.Instance.Content, new Color(72f / 255f, 72f / 255f, 72f / 255f));
LayoutElement leftLayout = leftPane.AddComponent<LayoutElement>();
leftLayout.minWidth = 350;
leftLayout.flexibleWidth = 0;
m_leftLayout = leftPane.AddComponent<LayoutElement>();
m_leftLayout.minWidth = 350;
m_leftLayout.flexibleWidth = 0;
VerticalLayoutGroup leftGroup = leftPane.GetComponent<VerticalLayoutGroup>();
leftGroup.padding.left = 4;
@ -170,21 +217,21 @@ namespace UnityExplorer.UI.Main.Home
leftGroup.padding.top = 8;
leftGroup.padding.bottom = 4;
leftGroup.spacing = 4;
leftGroup.childControlWidth = true;
leftGroup.childControlHeight = true;
leftGroup.SetChildControlWidth(true);
leftGroup.SetChildControlHeight(true);
leftGroup.childForceExpandWidth = true;
leftGroup.childForceExpandHeight = true;
GameObject titleObj = UIFactory.CreateLabel(leftPane, TextAnchor.UpperLeft);
Text titleLabel = titleObj.GetComponent<Text>();
m_titleObj = UIFactory.CreateLabel(leftPane, TextAnchor.UpperLeft);
Text titleLabel = m_titleObj.GetComponent<Text>();
titleLabel.text = "Scene Explorer";
titleLabel.fontSize = 20;
LayoutElement titleLayout = titleObj.AddComponent<LayoutElement>();
LayoutElement titleLayout = m_titleObj.AddComponent<LayoutElement>();
titleLayout.minHeight = 30;
titleLayout.flexibleHeight = 0;
GameObject sceneDropdownObj = UIFactory.CreateDropdown(leftPane, out m_sceneDropdown);
LayoutElement dropdownLayout = sceneDropdownObj.AddComponent<LayoutElement>();
m_sceneDropdownObj = UIFactory.CreateDropdown(leftPane, out m_sceneDropdown);
LayoutElement dropdownLayout = m_sceneDropdownObj.AddComponent<LayoutElement>();
dropdownLayout.minHeight = 40;
dropdownLayout.flexibleHeight = 0;
dropdownLayout.minWidth = 320;
@ -199,19 +246,19 @@ namespace UnityExplorer.UI.Main.Home
SceneExplorer.Instance.SetTargetScene(val);
}
GameObject scenePathGroupObj = UIFactory.CreateHorizontalGroup(leftPane, new Color(1, 1, 1, 0f));
HorizontalLayoutGroup scenePathGroup = scenePathGroupObj.GetComponent<HorizontalLayoutGroup>();
scenePathGroup.childControlHeight = true;
scenePathGroup.childControlWidth = true;
m_scenePathGroupObj = UIFactory.CreateHorizontalGroup(leftPane, new Color(1, 1, 1, 0f));
HorizontalLayoutGroup scenePathGroup = m_scenePathGroupObj.GetComponent<HorizontalLayoutGroup>();
scenePathGroup.SetChildControlHeight(true);
scenePathGroup.SetChildControlWidth(true);
scenePathGroup.childForceExpandHeight = true;
scenePathGroup.childForceExpandWidth = true;
scenePathGroup.spacing = 5;
LayoutElement scenePathLayout = scenePathGroupObj.AddComponent<LayoutElement>();
LayoutElement scenePathLayout = m_scenePathGroupObj.AddComponent<LayoutElement>();
scenePathLayout.minHeight = 20;
scenePathLayout.minWidth = 335;
scenePathLayout.flexibleWidth = 0;
m_backButtonObj = UIFactory.CreateButton(scenePathGroupObj);
m_backButtonObj = UIFactory.CreateButton(m_scenePathGroupObj);
Text backButtonText = m_backButtonObj.GetComponentInChildren<Text>();
backButtonText.text = "◄";
LayoutElement backButtonLayout = m_backButtonObj.AddComponent<LayoutElement>();
@ -224,7 +271,7 @@ namespace UnityExplorer.UI.Main.Home
backButton.onClick.AddListener(() => { SceneExplorer.Instance.SetSceneObjectParent(); });
GameObject scenePathLabel = UIFactory.CreateHorizontalGroup(scenePathGroupObj);
GameObject scenePathLabel = UIFactory.CreateHorizontalGroup(m_scenePathGroupObj);
Image image = scenePathLabel.GetComponent<Image>();
image.color = Color.white;
@ -248,7 +295,7 @@ namespace UnityExplorer.UI.Main.Home
textLayout.minHeight = 20;
textLayout.flexibleHeight = 0;
m_mainInspectBtn = UIFactory.CreateButton(scenePathGroupObj);
m_mainInspectBtn = UIFactory.CreateButton(m_scenePathGroupObj);
Text inspectButtonText = m_mainInspectBtn.GetComponentInChildren<Text>();
inspectButtonText.text = "Inspect";
LayoutElement inspectButtonLayout = m_mainInspectBtn.AddComponent<LayoutElement>();
@ -261,7 +308,7 @@ namespace UnityExplorer.UI.Main.Home
inspectButton.onClick.AddListener(() => { SceneExplorer.InspectSelectedGameObject(); });
GameObject scrollObj = UIFactory.CreateScrollView(leftPane, out m_pageContent, out SliderScrollbar scroller, new Color(0.1f, 0.1f, 0.1f));
m_scrollObj = UIFactory.CreateScrollView(leftPane, out m_pageContent, out SliderScrollbar scroller, new Color(0.1f, 0.1f, 0.1f));
m_pageHandler = new PageHandler(scroller);
m_pageHandler.ConstructUI(leftPane);
@ -275,47 +322,14 @@ namespace UnityExplorer.UI.Main.Home
var hideColors = hideBtn.colors;
hideColors.normalColor = new Color(0.15f, 0.15f, 0.15f);
hideBtn.colors = hideColors;
var hideText = hideButtonObj.GetComponentInChildren<Text>();
hideText = hideButtonObj.GetComponentInChildren<Text>();
hideText.text = "Hide Scene Explorer";
hideText.fontSize = 13;
var hideLayout = hideButtonObj.AddComponent<LayoutElement>();
hideLayout.minWidth = 20;
hideLayout.minHeight = 20;
hideBtn.onClick.AddListener(OnHide);
void OnHide()
{
if (!Hiding)
{
Hiding = true;
hideText.text = "►";
titleObj.SetActive(false);
sceneDropdownObj.SetActive(false);
scenePathGroupObj.SetActive(false);
scrollObj.SetActive(false);
m_pageHandler.Hide();
leftLayout.minWidth = 15;
}
else
{
Hiding = false;
hideText.text = "Hide Scene Explorer";
titleObj.SetActive(true);
sceneDropdownObj.SetActive(true);
scenePathGroupObj.SetActive(true);
scrollObj.SetActive(true);
leftLayout.minWidth = 350;
SceneExplorer.Instance.Update();
}
SceneExplorer.InvokeOnToggleShow();
}
hideBtn.onClick.AddListener(ToggleShow);
}
private void AddObjectListButton()
@ -325,9 +339,9 @@ namespace UnityExplorer.UI.Main.Home
GameObject btnGroupObj = UIFactory.CreateHorizontalGroup(m_pageContent, new Color(0.1f, 0.1f, 0.1f));
HorizontalLayoutGroup btnGroup = btnGroupObj.GetComponent<HorizontalLayoutGroup>();
btnGroup.childForceExpandWidth = true;
btnGroup.childControlWidth = true;
btnGroup.SetChildControlWidth(true);
btnGroup.childForceExpandHeight = false;
btnGroup.childControlHeight = true;
btnGroup.SetChildControlHeight(true);
LayoutElement btnLayout = btnGroupObj.AddComponent<LayoutElement>();
btnLayout.flexibleWidth = 320;
btnLayout.minHeight = 25;

View File

@ -22,6 +22,8 @@ namespace UnityExplorer.UI.Main
public readonly List<BaseMenuPage> Pages = new List<BaseMenuPage>();
private BaseMenuPage m_activePage;
public static Action<int> OnActiveTabChanged;
// Navbar buttons
private Button m_lastNavButtonPressed;
private readonly Color m_navButtonNormal = new Color(0.3f, 0.3f, 0.3f, 1);
@ -72,10 +74,15 @@ namespace UnityExplorer.UI.Main
internal bool pageLayoutInit;
internal int layoutInitIndex;
private int origDesiredPage = -1;
public void Update()
{
if (!pageLayoutInit)
{
if (origDesiredPage == -1)
origDesiredPage = ExplorerConfig.Instance?.Active_Tab ?? 0;
if (layoutInitIndex < Pages.Count)
{
SetPage(Pages[layoutInitIndex]);
@ -85,7 +92,7 @@ namespace UnityExplorer.UI.Main
{
pageLayoutInit = true;
MainPanel.transform.position = initPos;
SetPage(Pages[0]);
SetPage(Pages[origDesiredPage]);
}
return;
}
@ -98,19 +105,6 @@ namespace UnityExplorer.UI.Main
if (page == null || m_activePage == page)
return;
// WIP, was going to hide current page if you press current page's button,
// but the main panel does not resize so its just a big empty gap there.
// Could be good if I resize that gap, not bothering for now.
// Would need a fix in PanelDragger as well.
//if (m_activePage == page)
//{
// SetButtonInactiveColors(page.RefNavbarButton);
// m_activePage.Content.SetActive(false);
// m_activePage = null;
// return;
//}
m_activePage?.Content?.SetActive(false);
// unique case for console page, at the moment this will just go here
@ -128,6 +122,8 @@ namespace UnityExplorer.UI.Main
SetButtonInactiveColors(m_lastNavButtonPressed);
m_lastNavButtonPressed = button;
OnActiveTabChanged?.Invoke(Pages.IndexOf(m_activePage));
}
internal void SetButtonActiveColors(Button button)
@ -151,11 +147,14 @@ namespace UnityExplorer.UI.Main
MainPanel = UIFactory.CreatePanel(UIManager.CanvasRoot, "MainMenu", out GameObject content);
RectTransform panelRect = MainPanel.GetComponent<RectTransform>();
//panelRect.anchorMin = new Vector2(0.25f, 0.1f);
//panelRect.anchorMax = new Vector2(0.78f, 0.95f);
var anchors = ExplorerConfig.Instance.GetWindowAnchorsVector();
panelRect.anchorMin = new Vector2(anchors.x, anchors.y);
panelRect.anchorMax = new Vector2(anchors.z, anchors.w);
SetPanelAnchors(panelRect, anchors);
if (panelRect.rect.width < 400 || panelRect.rect.height < 400)
{
anchors = ExplorerConfig.DefaultWindowAnchors();
SetPanelAnchors(panelRect, anchors);
}
MainPanel.AddComponent<Mask>();
@ -168,6 +167,12 @@ namespace UnityExplorer.UI.Main
new DebugConsole(content);
}
private void SetPanelAnchors(RectTransform panelRect, Vector4 anchors)
{
panelRect.anchorMin = new Vector2(anchors.x, anchors.y);
panelRect.anchorMax = new Vector2(anchors.z, anchors.w);
}
private void ConstructTitleBar(GameObject content)
{
// Core title bar holder
@ -175,8 +180,8 @@ namespace UnityExplorer.UI.Main
GameObject titleBar = UIFactory.CreateHorizontalGroup(content);
HorizontalLayoutGroup titleGroup = titleBar.GetComponent<HorizontalLayoutGroup>();
titleGroup.childControlHeight = true;
titleGroup.childControlWidth = true;
titleGroup.SetChildControlHeight(true);
titleGroup.SetChildControlWidth(true);
titleGroup.childForceExpandHeight = true;
titleGroup.childForceExpandWidth = true;
titleGroup.padding.left = 15;
@ -239,8 +244,8 @@ namespace UnityExplorer.UI.Main
HorizontalLayoutGroup navGroup = navbarObj.GetComponent<HorizontalLayoutGroup>();
navGroup.spacing = 5;
navGroup.childControlHeight = true;
navGroup.childControlWidth = true;
navGroup.SetChildControlHeight(true);
navGroup.SetChildControlWidth(true);
navGroup.childForceExpandHeight = true;
navGroup.childForceExpandWidth = true;
@ -274,8 +279,8 @@ namespace UnityExplorer.UI.Main
{
GameObject mainObj = UIFactory.CreateHorizontalGroup(content);
HorizontalLayoutGroup mainGroup = mainObj.GetComponent<HorizontalLayoutGroup>();
mainGroup.childControlHeight = true;
mainGroup.childControlWidth = true;
mainGroup.SetChildControlHeight(true);
mainGroup.SetChildControlWidth(true);
mainGroup.childForceExpandHeight = true;
mainGroup.childForceExpandWidth = true;

View File

@ -62,8 +62,8 @@ namespace UnityExplorer.UI.Main
mainGroup.spacing = 5;
mainGroup.childForceExpandHeight = false;
mainGroup.childForceExpandWidth = true;
mainGroup.childControlHeight = true;
mainGroup.childControlWidth = true;
mainGroup.SetChildControlHeight(true);
mainGroup.SetChildControlWidth(true);
// ~~~~~ Title ~~~~~
@ -81,8 +81,8 @@ namespace UnityExplorer.UI.Main
var optionsGroup = optionsGroupObj.GetComponent<VerticalLayoutGroup>();
optionsGroup.childForceExpandHeight = false;
optionsGroup.childForceExpandWidth = true;
optionsGroup.childControlWidth = true;
optionsGroup.childControlHeight = true;
optionsGroup.SetChildControlWidth(true);
optionsGroup.SetChildControlHeight(true);
optionsGroup.spacing = 5;
optionsGroup.padding.top = 5;
optionsGroup.padding.left = 5;
@ -113,9 +113,9 @@ namespace UnityExplorer.UI.Main
{
var rowObj = UIFactory.CreateHorizontalGroup(optionsGroupObj, new Color(1, 1, 1, 0));
var rowGroup = rowObj.GetComponent<HorizontalLayoutGroup>();
rowGroup.childControlWidth = true;
rowGroup.SetChildControlWidth(true);
rowGroup.childForceExpandWidth = false;
rowGroup.childControlHeight = true;
rowGroup.SetChildControlHeight(true);
rowGroup.childForceExpandHeight = true;
var groupLayout = rowObj.AddComponent<LayoutElement>();
groupLayout.minHeight = 25;
@ -139,9 +139,9 @@ namespace UnityExplorer.UI.Main
{
var rowObj = UIFactory.CreateHorizontalGroup(parent, new Color(1, 1, 1, 0));
var rowGroup = rowObj.GetComponent<HorizontalLayoutGroup>();
rowGroup.childControlWidth = true;
rowGroup.SetChildControlWidth(true);
rowGroup.childForceExpandWidth = false;
rowGroup.childControlHeight = true;
rowGroup.SetChildControlHeight(true);
rowGroup.childForceExpandHeight = true;
var groupLayout = rowObj.AddComponent<LayoutElement>();
groupLayout.minHeight = 25;
@ -168,9 +168,9 @@ namespace UnityExplorer.UI.Main
{
var rowObj = UIFactory.CreateHorizontalGroup(parent, new Color(1, 1, 1, 0));
var rowGroup = rowObj.GetComponent<HorizontalLayoutGroup>();
rowGroup.childControlWidth = true;
rowGroup.SetChildControlWidth(true);
rowGroup.childForceExpandWidth = false;
rowGroup.childControlHeight = true;
rowGroup.SetChildControlHeight(true);
rowGroup.childForceExpandHeight = true;
var groupLayout = rowObj.AddComponent<LayoutElement>();
groupLayout.minHeight = 25;
@ -196,9 +196,9 @@ namespace UnityExplorer.UI.Main
var rowObj = UIFactory.CreateHorizontalGroup(parent, new Color(1, 1, 1, 0));
var rowGroup = rowObj.GetComponent<HorizontalLayoutGroup>();
rowGroup.childControlWidth = true;
rowGroup.SetChildControlWidth(true);
rowGroup.childForceExpandWidth = false;
rowGroup.childControlHeight = true;
rowGroup.SetChildControlHeight(true);
rowGroup.childForceExpandHeight = true;
var groupLayout = rowObj.AddComponent<LayoutElement>();
groupLayout.minHeight = 25;
@ -227,9 +227,9 @@ namespace UnityExplorer.UI.Main
var rowObj = UIFactory.CreateHorizontalGroup(parent, new Color(1, 1, 1, 0));
var rowGroup = rowObj.GetComponent<HorizontalLayoutGroup>();
rowGroup.childControlWidth = true;
rowGroup.SetChildControlWidth(true);
rowGroup.childForceExpandWidth = false;
rowGroup.childControlHeight = true;
rowGroup.SetChildControlHeight(true);
rowGroup.childForceExpandHeight = true;
var groupLayout = rowObj.AddComponent<LayoutElement>();
groupLayout.minHeight = 25;

View File

@ -5,6 +5,7 @@ using UnityEngine.UI;
using UnityExplorer.Core.Input;
using System.IO;
using UnityExplorer.Core.Inspectors;
using System.Diagnostics;
namespace UnityExplorer.UI
{
@ -39,7 +40,7 @@ namespace UnityExplorer.UI
Vector3 dragPos = DragableArea.InverseTransformPoint(rawMousePos);
bool inDragPos = DragableArea.rect.Contains(dragPos);
if (WasHoveringResize && s_resizeCursorImage)
if (WasHoveringResize && s_resizeCursorObj)
{
UpdateHoverImagePos();
}
@ -141,16 +142,16 @@ namespace UnityExplorer.UI
private bool WasHoveringResize { get; set; }
private ResizeTypes m_lastResizeHoverType;
public static GameObject s_resizeCursorImage;
public static GameObject s_resizeCursorObj;
private Rect m_resizeRect;
private readonly Dictionary<ResizeTypes, Rect> m_resizeMask = new Dictionary<ResizeTypes, Rect>
{
{ ResizeTypes.Top, Rect.zero },
{ ResizeTypes.Left, Rect.zero },
{ ResizeTypes.Right, Rect.zero },
{ ResizeTypes.Bottom, Rect.zero },
{ ResizeTypes.Top, default },
{ ResizeTypes.Left, default },
{ ResizeTypes.Right, default },
{ ResizeTypes.Bottom, default },
};
[Flags]
@ -167,15 +168,15 @@ namespace UnityExplorer.UI
BottomRight = Bottom | Right,
}
private const int HALF_THICKESS = RESIZE_THICKNESS / 2;
private const int DBL_THICKNESS = RESIZE_THICKNESS* 2;
private void UpdateResizeCache()
{
int halfThick = RESIZE_THICKNESS / 2;
int dblThick = RESIZE_THICKNESS * 2;
m_resizeRect = new Rect(Panel.rect.x - halfThick,
Panel.rect.y - halfThick,
Panel.rect.width + dblThick,
Panel.rect.height + dblThick);
m_resizeRect = new Rect(Panel.rect.x - HALF_THICKESS,
Panel.rect.y - HALF_THICKESS,
Panel.rect.width + DBL_THICKNESS,
Panel.rect.height + DBL_THICKNESS);
// calculate the four cross sections to use as flags
@ -196,20 +197,25 @@ namespace UnityExplorer.UI
private ResizeTypes GetResizeType(Vector2 mousePos)
{
// Calculate which part of the resize area we're in, if any.
// More readable method commented out below.
ResizeTypes mask = 0;
int mask = 0;
mask |= (int)ResizeTypes.Top * (m_resizeMask[ResizeTypes.Top].Contains(mousePos) ? 1 : 0);
mask |= (int)ResizeTypes.Bottom * (m_resizeMask[ResizeTypes.Bottom].Contains(mousePos) ? 1 : 0);
mask |= (int)ResizeTypes.Left * (m_resizeMask[ResizeTypes.Left].Contains(mousePos) ? 1 : 0);
mask |= (int)ResizeTypes.Right * (m_resizeMask[ResizeTypes.Right].Contains(mousePos) ? 1 : 0);
if (m_resizeMask[ResizeTypes.Top].Contains(mousePos))
mask |= ResizeTypes.Top;
else if (m_resizeMask[ResizeTypes.Bottom].Contains(mousePos))
mask |= ResizeTypes.Bottom;
//if (m_resizeMask[ResizeTypes.Top].Contains(mousePos))
// mask |= ResizeTypes.Top;
//else if (m_resizeMask[ResizeTypes.Bottom].Contains(mousePos))
// mask |= ResizeTypes.Bottom;
if (m_resizeMask[ResizeTypes.Left].Contains(mousePos))
mask |= ResizeTypes.Left;
else if (m_resizeMask[ResizeTypes.Right].Contains(mousePos))
mask |= ResizeTypes.Right;
//if (m_resizeMask[ResizeTypes.Left].Contains(mousePos))
// mask |= ResizeTypes.Left;
//else if (m_resizeMask[ResizeTypes.Right].Contains(mousePos))
// mask |= ResizeTypes.Right;
return mask;
return (ResizeTypes)mask;
}
public void OnHoverResize(ResizeTypes resizeType)
@ -222,7 +228,7 @@ namespace UnityExplorer.UI
WasHoveringResize = true;
m_lastResizeHoverType = resizeType;
s_resizeCursorImage.SetActive(true);
s_resizeCursorObj.SetActive(true);
// set the rotation for the resize icon
float iconRotation = 0f;
@ -239,9 +245,9 @@ namespace UnityExplorer.UI
iconRotation = 135f; break;
}
Quaternion rot = s_resizeCursorImage.transform.rotation;
Quaternion rot = s_resizeCursorObj.transform.rotation;
rot.eulerAngles = new Vector3(0, 0, iconRotation);
s_resizeCursorImage.transform.rotation = rot;
s_resizeCursorObj.transform.rotation = rot;
UpdateHoverImagePos();
}
@ -250,13 +256,13 @@ namespace UnityExplorer.UI
private void UpdateHoverImagePos()
{
RectTransform t = UIManager.CanvasRoot.GetComponent<RectTransform>();
s_resizeCursorImage.transform.localPosition = t.InverseTransformPoint(InputManager.MousePosition);
s_resizeCursorObj.transform.localPosition = t.InverseTransformPoint(InputManager.MousePosition);
}
public void OnHoverResizeEnd()
{
WasHoveringResize = false;
s_resizeCursorImage.SetActive(false);
s_resizeCursorObj.SetActive(false);
}
public void OnBeginResize(ResizeTypes resizeType)
@ -321,19 +327,18 @@ namespace UnityExplorer.UI
{
try
{
var sprite = UIManager.ResizeCursor;
s_resizeCursorObj = UIFactory.CreateLabel(UIManager.CanvasRoot.gameObject, TextAnchor.MiddleCenter);
s_resizeCursorImage = new GameObject("ResizeCursorImage");
s_resizeCursorImage.transform.SetParent(UIManager.CanvasRoot.transform);
var text = s_resizeCursorObj.GetComponent<Text>();
text.text = "↔";
text.fontSize = 35;
text.color = Color.white;
Image image = s_resizeCursorImage.AddComponent<Image>();
image.sprite = sprite;
image.material = Graphic.defaultGraphicMaterial;
RectTransform rect = image.transform.GetComponent<RectTransform>();
rect.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, 32);
rect.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, 32);
RectTransform rect = s_resizeCursorObj.transform.GetComponent<RectTransform>();
rect.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, 64);
rect.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, 64);
s_resizeCursorImage.SetActive(false);
s_resizeCursorObj.SetActive(false);
}
catch (Exception e)
{

View File

@ -295,8 +295,8 @@ namespace UnityExplorer.UI.Main
mainGroup.spacing = 5;
mainGroup.childForceExpandHeight = true;
mainGroup.childForceExpandWidth = true;
mainGroup.childControlHeight = true;
mainGroup.childControlWidth = true;
mainGroup.SetChildControlHeight(true);
mainGroup.SetChildControlWidth(true);
ConstructTopArea();
@ -308,9 +308,9 @@ namespace UnityExplorer.UI.Main
var topAreaObj = UIFactory.CreateVerticalGroup(Content, new Color(0.15f, 0.15f, 0.15f));
var topGroup = topAreaObj.GetComponent<VerticalLayoutGroup>();
topGroup.childForceExpandHeight = false;
topGroup.childControlHeight = true;
topGroup.SetChildControlHeight(true);
topGroup.childForceExpandWidth = true;
topGroup.childControlWidth = true;
topGroup.SetChildControlWidth(true);
topGroup.padding.top = 5;
topGroup.padding.left = 5;
topGroup.padding.right = 5;
@ -330,9 +330,9 @@ namespace UnityExplorer.UI.Main
var optionsGroupObj = UIFactory.CreateVerticalGroup(topAreaObj, new Color(0.1f, 0.1f, 0.1f));
var optionsGroup = optionsGroupObj.GetComponent<VerticalLayoutGroup>();
optionsGroup.childForceExpandHeight = false;
optionsGroup.childControlHeight = true;
optionsGroup.SetChildControlHeight(true);
optionsGroup.childForceExpandWidth = true;
optionsGroup.childControlWidth = true;
optionsGroup.SetChildControlWidth(true);
optionsGroup.spacing = 10;
optionsGroup.padding.top = 4;
optionsGroup.padding.right = 4;
@ -348,9 +348,9 @@ namespace UnityExplorer.UI.Main
var contextRowObj = UIFactory.CreateHorizontalGroup(optionsGroupObj, new Color(1, 1, 1, 0));
var contextGroup = contextRowObj.GetComponent<HorizontalLayoutGroup>();
contextGroup.childForceExpandWidth = false;
contextGroup.childControlWidth = true;
contextGroup.SetChildControlWidth(true);
contextGroup.childForceExpandHeight = false;
contextGroup.childControlHeight = true;
contextGroup.SetChildControlHeight(true);
contextGroup.spacing = 3;
var contextLayout = contextRowObj.AddComponent<LayoutElement>();
contextLayout.minHeight = 25;
@ -402,9 +402,9 @@ namespace UnityExplorer.UI.Main
var nameRowObj = UIFactory.CreateHorizontalGroup(optionsGroupObj, new Color(1, 1, 1, 0));
var nameRowGroup = nameRowObj.GetComponent<HorizontalLayoutGroup>();
nameRowGroup.childForceExpandWidth = true;
nameRowGroup.childControlWidth = true;
nameRowGroup.SetChildControlWidth(true);
nameRowGroup.childForceExpandHeight = false;
nameRowGroup.childControlHeight = true;
nameRowGroup.SetChildControlHeight(true);
var nameRowLayout = nameRowObj.AddComponent<LayoutElement>();
nameRowLayout.minHeight = 25;
nameRowLayout.flexibleHeight = 0;
@ -431,9 +431,9 @@ namespace UnityExplorer.UI.Main
m_extraFilterRow.SetActive(false);
var extraGroup = m_extraFilterRow.GetComponent<HorizontalLayoutGroup>();
extraGroup.childForceExpandHeight = true;
extraGroup.childControlHeight = true;
extraGroup.SetChildControlHeight(true);
extraGroup.childForceExpandWidth = false;
extraGroup.childControlWidth = true;
extraGroup.SetChildControlWidth(true);
var filterRowLayout = m_extraFilterRow.AddComponent<LayoutElement>();
filterRowLayout.minHeight = 25;
filterRowLayout.flexibleHeight = 0;
@ -543,8 +543,8 @@ namespace UnityExplorer.UI.Main
var resultGroup = resultGroupObj.GetComponent<VerticalLayoutGroup>();
resultGroup.childForceExpandHeight = false;
resultGroup.childForceExpandWidth = true;
resultGroup.childControlHeight = true;
resultGroup.childControlWidth = true;
resultGroup.SetChildControlHeight(true);
resultGroup.SetChildControlWidth(true);
resultGroup.spacing = 5;
resultGroup.padding.top = 5;
resultGroup.padding.right = 5;
@ -568,7 +568,7 @@ namespace UnityExplorer.UI.Main
var contentGroup = m_resultListContent.GetComponent<VerticalLayoutGroup>();
contentGroup.spacing = 2;
contentGroup.childForceExpandHeight = false;
contentGroup.childControlHeight = true;
contentGroup.SetChildControlHeight(true);
}
internal void AddResultButton()
@ -578,9 +578,9 @@ namespace UnityExplorer.UI.Main
GameObject btnGroupObj = UIFactory.CreateHorizontalGroup(m_resultListContent, new Color(0.1f, 0.1f, 0.1f));
HorizontalLayoutGroup btnGroup = btnGroupObj.GetComponent<HorizontalLayoutGroup>();
btnGroup.childForceExpandWidth = true;
btnGroup.childControlWidth = true;
btnGroup.SetChildControlWidth(true);
btnGroup.childForceExpandHeight = false;
btnGroup.childControlHeight = true;
btnGroup.SetChildControlHeight(true);
btnGroup.padding.top = 1;
btnGroup.padding.left = 1;
btnGroup.padding.right = 1;

View File

@ -176,8 +176,8 @@ namespace UnityExplorer.UI.Reusable
HorizontalLayoutGroup mainGroup = m_pageUIHolder.GetComponent<HorizontalLayoutGroup>();
mainGroup.childForceExpandHeight = true;
mainGroup.childForceExpandWidth = false;
mainGroup.childControlWidth = true;
mainGroup.childControlHeight = true;
mainGroup.SetChildControlWidth(true);
mainGroup.SetChildControlHeight(true);
LayoutElement mainLayout = m_pageUIHolder.AddComponent<LayoutElement>();
mainLayout.minHeight = 25;

View File

@ -97,8 +97,8 @@ namespace UnityExplorer.UI
img.color = Color.white;
VerticalLayoutGroup group = panelObj.AddComponent<VerticalLayoutGroup>();
group.childControlHeight = true;
group.childControlWidth = true;
group.SetChildControlHeight(true);
group.SetChildControlWidth(true);
group.childForceExpandHeight = true;
group.childForceExpandWidth = true;
@ -115,8 +115,8 @@ namespace UnityExplorer.UI
group2.padding.bottom = 3;
group2.padding.top = 3;
group2.spacing = 3;
group2.childControlHeight = true;
group2.childControlWidth = true;
group2.SetChildControlHeight(true);
group2.SetChildControlWidth(true);
group2.childForceExpandHeight = false;
group2.childForceExpandWidth = true;
@ -151,8 +151,8 @@ namespace UnityExplorer.UI
VerticalLayoutGroup horiGroup = groupObj.AddComponent<VerticalLayoutGroup>();
horiGroup.childAlignment = TextAnchor.UpperLeft;
horiGroup.childControlWidth = true;
horiGroup.childControlHeight = true;
horiGroup.SetChildControlWidth(true);
horiGroup.SetChildControlHeight(true);
Image image = groupObj.AddComponent<Image>();
if (color != default)
@ -173,8 +173,8 @@ namespace UnityExplorer.UI
HorizontalLayoutGroup horiGroup = groupObj.AddComponent<HorizontalLayoutGroup>();
horiGroup.childAlignment = TextAnchor.UpperLeft;
horiGroup.childControlWidth = true;
horiGroup.childControlHeight = true;
horiGroup.SetChildControlWidth(true);
horiGroup.SetChildControlHeight(true);
Image image = groupObj.AddComponent<Image>();
if (color != default)
@ -423,8 +423,8 @@ namespace UnityExplorer.UI
mainInput.colors = mainColors;
VerticalLayoutGroup mainGroup = mainObj.AddComponent<VerticalLayoutGroup>();
mainGroup.childControlHeight = true;
mainGroup.childControlWidth = true;
mainGroup.SetChildControlHeight(true);
mainGroup.SetChildControlWidth(true);
mainGroup.childForceExpandWidth = true;
mainGroup.childForceExpandHeight = true;
@ -655,9 +655,9 @@ namespace UnityExplorer.UI
var contentGroup = content.AddComponent<VerticalLayoutGroup>();
contentGroup.childForceExpandHeight = true;
contentGroup.childControlHeight = true;
contentGroup.SetChildControlHeight(true);
contentGroup.childForceExpandWidth = true;
contentGroup.childControlWidth = true;
contentGroup.SetChildControlWidth(true);
contentGroup.padding.left = 5;
contentGroup.padding.right = 5;
contentGroup.padding.top = 5;
@ -668,7 +668,7 @@ namespace UnityExplorer.UI
var scrollbarLayout = scrollBarObj.AddComponent<VerticalLayoutGroup>();
scrollbarLayout.childForceExpandHeight = true;
scrollbarLayout.childControlHeight = true;
scrollbarLayout.SetChildControlHeight(true);
RectTransform scrollBarRect = scrollBarObj.GetComponent<RectTransform>();
scrollBarRect.anchorMin = new Vector2(1.0f, 0.0f);

View File

@ -20,7 +20,7 @@ namespace UnityExplorer.UI
internal static Font ConsoleFont { get; private set; }
internal static Sprite ResizeCursor { get; private set; }
//internal static Sprite ResizeCursor { get; private set; }
internal static Shader BackupShader { get; private set; }
public static bool ShowMenu
@ -76,6 +76,33 @@ namespace UnityExplorer.UI
Canvas.ForceUpdateCanvases();
}
private static GameObject CreateRootCanvas()
{
GameObject rootObj = new GameObject("ExplorerCanvas");
UnityEngine.Object.DontDestroyOnLoad(rootObj);
rootObj.layer = 5;
CanvasRoot = rootObj;
CanvasRoot.transform.position = new Vector3(0f, 0f, 1f);
EventSys = rootObj.AddComponent<EventSystem>();
InputManager.AddUIModule();
Canvas canvas = rootObj.AddComponent<Canvas>();
canvas.renderMode = RenderMode.ScreenSpaceCamera;
canvas.referencePixelsPerUnit = 100;
canvas.sortingOrder = 999;
//canvas.pixelPerfect = false;
CanvasScaler scaler = rootObj.AddComponent<CanvasScaler>();
scaler.referenceResolution = new Vector2(1920, 1080);
scaler.screenMatchMode = CanvasScaler.ScreenMatchMode.Expand;
rootObj.AddComponent<GraphicRaycaster>();
return rootObj;
}
private static void SetShowMenu(bool show)
{
if (s_showMenu == show)
@ -96,12 +123,6 @@ namespace UnityExplorer.UI
CursorUnlocker.UpdateCursorControl();
}
//public static void OnSceneChange()
//{
// SceneExplorer.Instance?.OnSceneChange();
// SearchPage.Instance?.OnSceneChange();
//}
public static void Update()
{
if (InputManager.GetKeyDown(ExplorerConfig.Instance.Main_Menu_Toggle))
@ -151,24 +172,6 @@ namespace UnityExplorer.UI
}
}
private static AssetBundle LoadExplorerUi(string id)
{
return AssetBundle.LoadFromMemory(ReadFully(typeof(ExplorerCore).Assembly.GetManifestResourceStream($"UnityExplorer.Resources.explorerui.{id}.bundle")));
}
private static byte[] ReadFully(this Stream input)
{
using (var ms = new MemoryStream())
{
byte[] buffer = new byte[81920];
int read;
while ((read = input.Read(buffer, 0, buffer.Length)) != 0)
ms.Write(buffer, 0, read);
return ms.ToArray();
}
}
private static void LoadBundle()
{
AssetBundle bundle = null;
@ -176,10 +179,12 @@ namespace UnityExplorer.UI
try
{
bundle = LoadExplorerUi("modern");
if (bundle == null)
throw new Exception();
}
catch
{
ExplorerCore.Log("Failed to load modern ExplorerUI Bundle, falling back to legacy");
ExplorerCore.Log("Failed to load Unity 2017 ExplorerUI Bundle, falling back to legacy");
try
{
@ -194,6 +199,7 @@ namespace UnityExplorer.UI
if (bundle == null)
{
ExplorerCore.LogWarning("Could not load the ExplorerUI Bundle!");
ConsoleFont = Resources.GetBuiltinResource<Font>("Arial.ttf");
return;
}
@ -206,38 +212,29 @@ namespace UnityExplorer.UI
Graphic.defaultGraphicMaterial.shader = BackupShader;
}
ResizeCursor = bundle.LoadAsset<Sprite>("cursor");
//ResizeCursor = bundle.LoadAsset<Sprite>("cursor");
ConsoleFont = bundle.LoadAsset<Font>("CONSOLA");
ExplorerCore.Log("Loaded UI bundle");
}
private static GameObject CreateRootCanvas()
private static AssetBundle LoadExplorerUi(string id)
{
GameObject rootObj = new GameObject("ExplorerCanvas");
UnityEngine.Object.DontDestroyOnLoad(rootObj);
rootObj.layer = 5;
var data = ReadFully(typeof(ExplorerCore).Assembly.GetManifestResourceStream($"UnityExplorer.Resources.explorerui.{id}.bundle"));
return AssetBundle.LoadFromMemory(data);
}
CanvasRoot = rootObj;
CanvasRoot.transform.position = new Vector3(0f, 0f, 1f);
EventSys = rootObj.AddComponent<EventSystem>();
InputManager.AddUIModule();
Canvas canvas = rootObj.AddComponent<Canvas>();
canvas.renderMode = RenderMode.ScreenSpaceCamera;
canvas.referencePixelsPerUnit = 100;
canvas.sortingOrder = 999;
//canvas.pixelPerfect = false;
CanvasScaler scaler = rootObj.AddComponent<CanvasScaler>();
scaler.referenceResolution = new Vector2(1920, 1080);
scaler.screenMatchMode = CanvasScaler.ScreenMatchMode.Expand;
rootObj.AddComponent<GraphicRaycaster>();
return rootObj;
private static byte[] ReadFully(this Stream input)
{
using (var ms = new MemoryStream())
{
byte[] buffer = new byte[81920];
int read;
while ((read = input.Read(buffer, 0, buffer.Length)) != 0)
ms.Write(buffer, 0, read);
return ms.ToArray();
}
}
}
}

View File

@ -1,371 +1,332 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release_ML_Cpp</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}</ProjectGuid>
<OutputType>Library</OutputType>
<!--<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>-->
<AppDesignerFolder>Properties</AppDesignerFolder>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<OutputPath>..\Release\UnityExplorer.MelonLoader.Il2Cpp\</OutputPath>
<DefineConstants>
</DefineConstants>
<IsCpp>false</IsCpp>
<IsMelonLoader>false</IsMelonLoader>
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<RootNamespace>UnityExplorer</RootNamespace>
<!-- Set this to the BepInEx Il2Cpp Game folder, without the ending '\' character. -->
<BIECppGameFolder>E:\source\Unity Projects\Test\_BUILD</BIECppGameFolder>
<!-- Set this to the MelonLoader Il2Cpp Game folder, without the ending '\' character. -->
<MLCppGameFolder>E:\source\Unity Projects\Test\_BUILD</MLCppGameFolder>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_ML_Cpp|AnyCPU' ">
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.MelonLoader.Il2Cpp\</OutputPath>
<DefineConstants>CPP,ML</DefineConstants>
<AssemblyName>UnityExplorer.ML.IL2CPP</AssemblyName>
<IsCpp>true</IsCpp>
<IsMelonLoader>true</IsMelonLoader>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_ML_Mono|AnyCPU' ">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.MelonLoader.Mono\</OutputPath>
<DefineConstants>MONO,ML</DefineConstants>
<AssemblyName>UnityExplorer.ML.Mono</AssemblyName>
<Prefer32Bit>false</Prefer32Bit>
<IsCpp>false</IsCpp>
<IsMelonLoader>true</IsMelonLoader>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_BIE_Cpp|AnyCPU' ">
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.BepInEx.Il2Cpp\</OutputPath>
<DefineConstants>CPP,BIE,BIE6</DefineConstants>
<AssemblyName>UnityExplorer.BIE.IL2CPP</AssemblyName>
<IsCpp>true</IsCpp>
<IsMelonLoader>false</IsMelonLoader>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_BIE6_Mono|AnyCPU' ">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.BepInEx6.Mono\</OutputPath>
<DefineConstants>MONO,BIE,BIE6</DefineConstants>
<AssemblyName>UnityExplorer.BIE6.Mono</AssemblyName>
<IsCpp>false</IsCpp>
<IsMelonLoader>false</IsMelonLoader>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_BIE5_Mono|AnyCPU'">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.BepInEx5.Mono\</OutputPath>
<DefineConstants>MONO,BIE,BIE5</DefineConstants>
<AssemblyName>UnityExplorer.BIE5.Mono</AssemblyName>
<IsCpp>false</IsCpp>
<IsMelonLoader>false</IsMelonLoader>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_STANDALONE_Mono|AnyCPU'">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.Standalone.Mono\</OutputPath>
<DefineConstants>MONO,STANDALONE</DefineConstants>
<AssemblyName>UnityExplorer.STANDALONE.Mono</AssemblyName>
<IsCpp>false</IsCpp>
<IsMelonLoader>false</IsMelonLoader>
<IsStandalone>true</IsStandalone>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_STANDALONE_Cpp|AnyCPU'">
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.Standalone.Il2Cpp\</OutputPath>
<DefineConstants>CPP,STANDALONE</DefineConstants>
<AssemblyName>UnityExplorer.STANDALONE.IL2CPP</AssemblyName>
<IsCpp>true</IsCpp>
<IsMelonLoader>false</IsMelonLoader>
<IsStandalone>true</IsStandalone>
</PropertyGroup>
<ItemGroup>
<Reference Include="INIFileParser, Version=2.5.2.0, Culture=neutral, PublicKeyToken=79af7b307b65cf3c, processorArchitecture=MSIL">
<HintPath>packages\ini-parser.2.5.2\lib\net20\INIFileParser.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<!-- MCS ref -->
<Reference Include="mcs">
<HintPath>..\lib\mcs.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- Universal Mono UnityEngine.dll ref (v5.3) -->
<ItemGroup Condition="'$(IsCpp)'=='false'">
<Reference Include="UnityEngine">
<HintPath>..\lib\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\lib\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- MelonLoader Mono refs -->
<ItemGroup Condition="'$(IsMelonLoader)|$(IsCpp)'=='true|false'">
<Reference Include="MelonLoader">
<HintPath>..\lib\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- BepInEx 5 Mono refs -->
<ItemGroup Condition="'$(IsMelonLoader)|$(IsCpp)|$(Configuration)'=='false|false|Release_BIE5_Mono'">
<Reference Include="BepInEx">
<HintPath>..\lib\BepInEx.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="0Harmony">
<HintPath>..\lib\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- BepInEx 6 Mono refs -->
<ItemGroup Condition="'$(IsMelonLoader)|$(IsCpp)|$(Configuration)'=='false|false|Release_BIE6_Mono'">
<Reference Include="BepInEx">
<HintPath>..\lib\BepInEx.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="BepInEx.Unity">
<HintPath>..\lib\BepInEx.Unity.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="0Harmony">
<HintPath>..\lib\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- Standalone refs -->
<ItemGroup Condition="'$(IsStandalone)'=='true'">
<Reference Include="0Harmony">
<HintPath>..\lib\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- MelonLoader Il2Cpp refs -->
<ItemGroup Condition="'$(IsMelonLoader)|$(IsCpp)'=='true|true'">
<Reference Include="MelonLoader">
<HintPath>$(MLCppGameFolder)\MelonLoader\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnhollowerBaseLib">
<HintPath>$(MLCppGameFolder)\MelonLoader\Managed\UnhollowerBaseLib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Il2Cppmscorlib">
<HintPath>$(MLCppGameFolder)\MelonLoader\Managed\Il2Cppmscorlib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Il2CppSystem.Core">
<HintPath>$(MLCppGameFolder)\MelonLoader\Managed\Il2CppSystem.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>$(MLCppGameFolder)\MelonLoader\Managed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>$(MLCppGameFolder)\MelonLoader\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>$(MLCppGameFolder)\MelonLoader\Managed\UnityEngine.PhysicsModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>$(MLCppGameFolder)\MelonLoader\Managed\UnityEngine.TextRenderingModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>$(MLCppGameFolder)\MelonLoader\Managed\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UIModule">
<HintPath>$(MLCppGameFolder)\MelonLoader\Managed\UnityEngine.UIModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>$(MLCppGameFolder)\MelonLoader\Managed\UnityEngine.IMGUIModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- BepInEx Il2Cpp refs -->
<ItemGroup Condition="'$(IsMelonLoader)|$(IsCpp)'=='false|true'">
<Reference Include="BepInEx">
<HintPath>$(BIECppGameFolder)\BepInEx\core\BepInEx.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="0Harmony">
<HintPath>$(BIECppGameFolder)\BepInEx\core\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="BepInEx.IL2CPP">
<HintPath>$(BIECppGameFolder)\BepInEx\core\BepInEx.IL2CPP.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnhollowerBaseLib">
<HintPath>$(BIECppGameFolder)\BepInEx\core\UnhollowerBaseLib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Il2Cppmscorlib">
<HintPath>$(BIECppGameFolder)\BepInEx\unhollowed\Il2Cppmscorlib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Il2CppSystem.Core">
<HintPath>$(BIECppGameFolder)\BepInEx\unhollowed\Il2CppSystem.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>$(BIECppGameFolder)\BepInEx\unhollowed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>$(BIECppGameFolder)\BepInEx\unhollowed\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>$(BIECppGameFolder)\BepInEx\unhollowed\UnityEngine.PhysicsModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>$(BIECppGameFolder)\BepInEx\unhollowed\UnityEngine.TextRenderingModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>$(BIECppGameFolder)\BepInEx\unhollowed\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UIModule">
<HintPath>$(BIECppGameFolder)\BepInEx\unhollowed\UnityEngine.UIModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>$(BIECppGameFolder)\BepInEx\unhollowed\UnityEngine.IMGUIModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Loader\ExplorerBepIn6Plugin.cs" />
<Compile Include="Loader\ExplorerStandalone.cs" />
<Compile Include="Core\Runtime\Il2Cpp\Il2CppReflection.cs" />
<Compile Include="Core\Runtime\Il2Cpp\Il2CppTextureUtil.cs" />
<Compile Include="Core\Runtime\Mono\MonoReflection.cs" />
<Compile Include="Core\Runtime\Mono\MonoTextureUtil.cs" />
<Compile Include="Core\Runtime\ReflectionProvider.cs" />
<Compile Include="Core\Runtime\TextureUtilProvider.cs" />
<Compile Include="Core\Inspectors\InspectUnderMouse.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CacheEnumerated.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CacheField.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CachePaired.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CacheMember.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CacheMethod.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CacheProperty.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CacheObjectBase.cs" />
<Compile Include="Core\Config\ExplorerConfig.cs" />
<Compile Include="ExplorerCore.cs" />
<Compile Include="Loader\ExplorerBepIn5Plugin.cs" />
<Compile Include="Loader\ExplorerMelonMod.cs" />
<Compile Include="Core\ReflectionUtility.cs" />
<Compile Include="Core\Unity\UnityHelper.cs" />
<Compile Include="UI\Main\Home\Inspectors\GameObjects\ChildList.cs" />
<Compile Include="UI\Main\Home\Inspectors\GameObjects\ComponentList.cs" />
<Compile Include="UI\Main\Home\Inspectors\GameObjects\GameObjectControls.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveBool.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveDictionary.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveEnum.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveEnumerable.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveFlags.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveNumber.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveString.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveUnityStruct.cs" />
<Compile Include="Loader\IExplorerLoader.cs" />
<Compile Include="Core\Runtime\Il2Cpp\Il2CppProvider.cs" />
<Compile Include="Core\Runtime\RuntimeProvider.cs" />
<Compile Include="Core\Runtime\Mono\MonoProvider.cs" />
<Compile Include="Core\Search\ChildFilter.cs" />
<Compile Include="Core\Search\SceneFilter.cs" />
<Compile Include="Core\Search\SearchContext.cs" />
<Compile Include="Core\Search\SearchProvider.cs" />
<Compile Include="UI\Main\Home\InspectorManagerUI.cs" />
<Compile Include="UI\Main\Home\Inspectors\GameObjects\GameObjectInspectorUI.cs" />
<Compile Include="UI\Main\Home\Inspectors\InspectorBaseUI.cs" />
<Compile Include="UI\Main\Home\Inspectors\Reflection\InstanceInspectorUI.cs" />
<Compile Include="UI\Main\Home\Inspectors\MouseInspectorUI.cs" />
<Compile Include="UI\Main\Home\Inspectors\Reflection\ReflectionInspectorUI.cs" />
<Compile Include="UI\Main\Home\SceneExplorerUI.cs" />
<Compile Include="UI\Utility\CursorUnlocker.cs" />
<Compile Include="Core\Input\IHandleInput.cs" />
<Compile Include="Core\Tests\Tests.cs" />
<Compile Include="Core\Input\InputManager.cs" />
<Compile Include="Core\Input\InputSystem.cs" />
<Compile Include="Core\Input\LegacyInput.cs" />
<Compile Include="Core\Input\NoInput.cs" />
<Compile Include="UI\Main\DebugConsole.cs" />
<Compile Include="Core\InspectorManager.cs" />
<Compile Include="Core\Inspectors\Reflection\ReflectionInspector.cs" />
<Compile Include="UI\Main\MainMenu.cs" />
<Compile Include="UI\Main\CSConsole\CSharpConsole.cs" />
<Compile Include="UI\Main\CSConsole\AutoCompleter.cs" />
<Compile Include="UI\Main\CSConsole\Lexer\CommentMatch.cs" />
<Compile Include="UI\Main\CSConsole\CSLexerHighlighter.cs" />
<Compile Include="UI\Main\CSConsole\Lexer\KeywordMatch.cs" />
<Compile Include="UI\Main\CSConsole\Lexer\StringMatch.cs" />
<Compile Include="UI\Main\CSConsole\Lexer\Matcher.cs" />
<Compile Include="UI\Main\CSConsole\Lexer\NumberMatch.cs" />
<Compile Include="UI\Main\CSConsole\Lexer\SymbolMatch.cs" />
<Compile Include="Core\CSharp\Suggestion.cs" />
<Compile Include="Core\CSharp\ScriptEvaluator.cs" />
<Compile Include="Core\CSharp\ScriptInteraction.cs" />
<Compile Include="UI\Main\Home\HomePage.cs" />
<Compile Include="Core\Inspectors\GameObjects\GameObjectInspector.cs" />
<Compile Include="Core\Inspectors\InspectorBase.cs" />
<Compile Include="Core\Inspectors\Reflection\InstanceInspector.cs" />
<Compile Include="Core\Inspectors\Reflection\StaticInspector.cs" />
<Compile Include="UI\Main\BaseMenuPage.cs" />
<Compile Include="UI\Main\Options\OptionsPage.cs" />
<Compile Include="Core\SceneExplorer.cs" />
<Compile Include="UI\Main\Search\SearchPage.cs" />
<Compile Include="UI\Main\PanelDragger.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveValue.cs" />
<Compile Include="UI\Reusable\InputFieldScroller.cs" />
<Compile Include="UI\Reusable\SliderScrollbar.cs" />
<Compile Include="UI\Reusable\PageHandler.cs" />
<Compile Include="UI\Utility\SignatureHighlighter.cs" />
<Compile Include="UI\UIManager.cs" />
<Compile Include="Core\Runtime\Il2Cpp\AssetBundle.cs" />
<Compile Include="Core\Unity\ColorHelper.cs" />
<Compile Include="Core\Runtime\Il2Cpp\ICallManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UI\UIFactory.cs" />
<EmbeddedResource Include="Resources\*" />
</ItemGroup>
<ItemGroup>
<None Include="ILRepack.targets" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\ILRepack.Lib.MSBuild.Task.2.0.18.1\build\ILRepack.Lib.MSBuild.Task.targets" Condition="Exists('packages\ILRepack.Lib.MSBuild.Task.2.0.18.1\build\ILRepack.Lib.MSBuild.Task.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
<Configuration Condition=" '$(Configuration)' == '' ">Release_ML_Cpp</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}</ProjectGuid>
<OutputType>Library</OutputType>
<!--<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>-->
<AppDesignerFolder>Properties</AppDesignerFolder>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<OutputPath>..\Release\UnityExplorer.MelonLoader.Il2Cpp\</OutputPath>
<DefineConstants>
</DefineConstants>
<IsCpp>false</IsCpp>
<IsMelonLoader>false</IsMelonLoader>
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<RootNamespace>UnityExplorer</RootNamespace>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<Error Condition="!Exists('packages\ILRepack.Lib.MSBuild.Task.2.0.18.1\build\ILRepack.Lib.MSBuild.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\ILRepack.Lib.MSBuild.Task.2.0.18.1\build\ILRepack.Lib.MSBuild.Task.targets'))" />
</Target>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_ML_Cpp|AnyCPU' ">
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.MelonLoader.Il2Cpp\</OutputPath>
<DefineConstants>CPP,ML</DefineConstants>
<AssemblyName>UnityExplorer.ML.IL2CPP</AssemblyName>
<IsCpp>true</IsCpp>
<IsMelonLoader>true</IsMelonLoader>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_ML_Mono|AnyCPU' ">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.MelonLoader.Mono\</OutputPath>
<DefineConstants>MONO,ML</DefineConstants>
<AssemblyName>UnityExplorer.ML.Mono</AssemblyName>
<Prefer32Bit>false</Prefer32Bit>
<IsCpp>false</IsCpp>
<IsMelonLoader>true</IsMelonLoader>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_BIE_Cpp|AnyCPU' ">
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.BepInEx.Il2Cpp\</OutputPath>
<DefineConstants>CPP,BIE,BIE6</DefineConstants>
<AssemblyName>UnityExplorer.BIE.IL2CPP</AssemblyName>
<IsCpp>true</IsCpp>
<IsMelonLoader>false</IsMelonLoader>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_BIE6_Mono|AnyCPU' ">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.BepInEx6.Mono\</OutputPath>
<DefineConstants>MONO,BIE,BIE6</DefineConstants>
<AssemblyName>UnityExplorer.BIE6.Mono</AssemblyName>
<IsCpp>false</IsCpp>
<IsMelonLoader>false</IsMelonLoader>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_BIE5_Mono|AnyCPU'">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.BepInEx5.Mono\</OutputPath>
<DefineConstants>MONO,BIE,BIE5</DefineConstants>
<AssemblyName>UnityExplorer.BIE5.Mono</AssemblyName>
<IsCpp>false</IsCpp>
<IsMelonLoader>false</IsMelonLoader>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_STANDALONE_Mono|AnyCPU'">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.Standalone.Mono\</OutputPath>
<DefineConstants>MONO,STANDALONE</DefineConstants>
<AssemblyName>UnityExplorer.STANDALONE.Mono</AssemblyName>
<IsCpp>false</IsCpp>
<IsMelonLoader>false</IsMelonLoader>
<IsStandalone>true</IsStandalone>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_STANDALONE_Cpp|AnyCPU'">
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.Standalone.Il2Cpp\</OutputPath>
<DefineConstants>CPP,STANDALONE</DefineConstants>
<AssemblyName>UnityExplorer.STANDALONE.IL2CPP</AssemblyName>
<IsCpp>true</IsCpp>
<IsMelonLoader>false</IsMelonLoader>
<IsStandalone>true</IsStandalone>
</PropertyGroup>
<ItemGroup>
<Reference Include="INIFileParser, Version=2.5.2.0, Culture=neutral, PublicKeyToken=79af7b307b65cf3c, processorArchitecture=MSIL">
<HintPath>packages\ini-parser.2.5.2\lib\net20\INIFileParser.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<!-- MCS ref -->
<Reference Include="mcs">
<HintPath>..\lib\mcs.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- Universal Mono UnityEngine.dll ref (v5.3) -->
<ItemGroup Condition="'$(IsCpp)'=='false'">
<Reference Include="UnityEngine">
<HintPath>..\lib\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\lib\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- MelonLoader Mono refs -->
<ItemGroup Condition="'$(IsMelonLoader)|$(IsCpp)'=='true|false'">
<Reference Include="MelonLoader">
<HintPath>..\lib\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- BepInEx 5 Mono refs -->
<ItemGroup Condition="'$(IsMelonLoader)|$(IsCpp)|$(Configuration)'=='false|false|Release_BIE5_Mono'">
<Reference Include="BepInEx">
<HintPath>..\lib\BepInEx.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="0Harmony">
<HintPath>..\lib\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- BepInEx 6 Mono refs -->
<ItemGroup Condition="'$(IsMelonLoader)|$(IsCpp)|$(Configuration)'=='false|false|Release_BIE6_Mono'">
<Reference Include="BepInEx">
<HintPath>..\lib\BepInEx.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="BepInEx.Unity">
<HintPath>..\lib\BepInEx.Unity.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="0Harmony">
<HintPath>..\lib\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- Standalone refs -->
<ItemGroup Condition="'$(IsStandalone)'=='true'">
<Reference Include="0Harmony">
<HintPath>..\lib\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- MelonLoader Il2Cpp refs -->
<ItemGroup Condition="'$(IsMelonLoader)|$(IsCpp)'=='true|true'">
<Reference Include="MelonLoader">
<HintPath>..\lib\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- BepInEx Il2Cpp refs -->
<ItemGroup Condition="'$(IsMelonLoader)|$(IsCpp)'=='false|true'">
<Reference Include="BepInEx">
<HintPath>..\lib\BepInEx.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="0Harmony">
<HintPath>..\lib\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="BepInEx.IL2CPP">
<HintPath>..\lib\BepInEx.IL2CPP.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- Unhollowed Il2Cpp refs -->
<ItemGroup Condition="'$(IsCpp)'=='true'">
<Reference Include="UnhollowerBaseLib">
<HintPath>..\lib\UnhollowerBaseLib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Il2Cppmscorlib">
<HintPath>..\lib\unhollowed\Il2Cppmscorlib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Il2CppSystem.Core">
<HintPath>..\lib\unhollowed\Il2CppSystem.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\lib\unhollowed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\lib\unhollowed\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>..\lib\unhollowed\UnityEngine.PhysicsModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>..\lib\unhollowed\UnityEngine.TextRenderingModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\lib\unhollowed\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UIModule">
<HintPath>..\lib\unhollowed\UnityEngine.UIModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>..\lib\unhollowed\UnityEngine.IMGUIModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Core\CSharp\DummyBehaviour.cs" />
<Compile Include="Core\Runtime\Il2Cpp\Il2CppCoroutine.cs" />
<Compile Include="Loader\ExplorerBepIn6Plugin.cs" />
<Compile Include="Loader\ExplorerStandalone.cs" />
<Compile Include="Core\Runtime\Il2Cpp\Il2CppReflection.cs" />
<Compile Include="Core\Runtime\Il2Cpp\Il2CppTextureUtil.cs" />
<Compile Include="Core\Runtime\Mono\MonoReflection.cs" />
<Compile Include="Core\Runtime\Mono\MonoTextureUtil.cs" />
<Compile Include="Core\Runtime\ReflectionProvider.cs" />
<Compile Include="Core\Runtime\TextureUtilProvider.cs" />
<Compile Include="Core\Inspectors\InspectUnderMouse.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CacheEnumerated.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CacheField.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CachePaired.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CacheMember.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CacheMethod.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CacheProperty.cs" />
<Compile Include="Core\Inspectors\Reflection\CacheObject\CacheObjectBase.cs" />
<Compile Include="Core\Config\ExplorerConfig.cs" />
<Compile Include="ExplorerCore.cs" />
<Compile Include="Loader\ExplorerBepIn5Plugin.cs" />
<Compile Include="Loader\ExplorerMelonMod.cs" />
<Compile Include="Core\ReflectionUtility.cs" />
<Compile Include="Core\Unity\UnityHelper.cs" />
<Compile Include="UI\Main\Home\Inspectors\GameObjects\ChildList.cs" />
<Compile Include="UI\Main\Home\Inspectors\GameObjects\ComponentList.cs" />
<Compile Include="UI\Main\Home\Inspectors\GameObjects\GameObjectControls.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveBool.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveDictionary.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveEnum.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveEnumerable.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveFlags.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveNumber.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveString.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveUnityStruct.cs" />
<Compile Include="Loader\IExplorerLoader.cs" />
<Compile Include="Core\Runtime\Il2Cpp\Il2CppProvider.cs" />
<Compile Include="Core\Runtime\RuntimeProvider.cs" />
<Compile Include="Core\Runtime\Mono\MonoProvider.cs" />
<Compile Include="Core\Search\ChildFilter.cs" />
<Compile Include="Core\Search\SceneFilter.cs" />
<Compile Include="Core\Search\SearchContext.cs" />
<Compile Include="Core\Search\SearchProvider.cs" />
<Compile Include="UI\Main\Home\InspectorManagerUI.cs" />
<Compile Include="UI\Main\Home\Inspectors\GameObjects\GameObjectInspectorUI.cs" />
<Compile Include="UI\Main\Home\Inspectors\InspectorBaseUI.cs" />
<Compile Include="UI\Main\Home\Inspectors\Reflection\InstanceInspectorUI.cs" />
<Compile Include="UI\Main\Home\Inspectors\MouseInspectorUI.cs" />
<Compile Include="UI\Main\Home\Inspectors\Reflection\ReflectionInspectorUI.cs" />
<Compile Include="UI\Main\Home\SceneExplorerUI.cs" />
<Compile Include="UI\Utility\CursorUnlocker.cs" />
<Compile Include="Core\Input\IHandleInput.cs" />
<Compile Include="Core\Tests\Tests.cs" />
<Compile Include="Core\Input\InputManager.cs" />
<Compile Include="Core\Input\InputSystem.cs" />
<Compile Include="Core\Input\LegacyInput.cs" />
<Compile Include="Core\Input\NoInput.cs" />
<Compile Include="UI\Main\DebugConsole.cs" />
<Compile Include="Core\InspectorManager.cs" />
<Compile Include="Core\Inspectors\Reflection\ReflectionInspector.cs" />
<Compile Include="UI\Main\MainMenu.cs" />
<Compile Include="UI\Main\CSConsole\CSharpConsole.cs" />
<Compile Include="UI\Main\CSConsole\AutoCompleter.cs" />
<Compile Include="UI\Main\CSConsole\Lexer\CommentMatch.cs" />
<Compile Include="UI\Main\CSConsole\CSLexerHighlighter.cs" />
<Compile Include="UI\Main\CSConsole\Lexer\KeywordMatch.cs" />
<Compile Include="UI\Main\CSConsole\Lexer\StringMatch.cs" />
<Compile Include="UI\Main\CSConsole\Lexer\Matcher.cs" />
<Compile Include="UI\Main\CSConsole\Lexer\NumberMatch.cs" />
<Compile Include="UI\Main\CSConsole\Lexer\SymbolMatch.cs" />
<Compile Include="Core\CSharp\Suggestion.cs" />
<Compile Include="Core\CSharp\ScriptEvaluator.cs" />
<Compile Include="Core\CSharp\ScriptInteraction.cs" />
<Compile Include="UI\Main\Home\HomePage.cs" />
<Compile Include="Core\Inspectors\GameObjects\GameObjectInspector.cs" />
<Compile Include="Core\Inspectors\InspectorBase.cs" />
<Compile Include="Core\Inspectors\Reflection\InstanceInspector.cs" />
<Compile Include="Core\Inspectors\Reflection\StaticInspector.cs" />
<Compile Include="UI\Main\BaseMenuPage.cs" />
<Compile Include="UI\Main\Options\OptionsPage.cs" />
<Compile Include="Core\SceneExplorer.cs" />
<Compile Include="UI\Main\Search\SearchPage.cs" />
<Compile Include="UI\Main\PanelDragger.cs" />
<Compile Include="Core\Inspectors\Reflection\InteractiveValue\InteractiveValue.cs" />
<Compile Include="UI\Reusable\InputFieldScroller.cs" />
<Compile Include="UI\Reusable\SliderScrollbar.cs" />
<Compile Include="UI\Reusable\PageHandler.cs" />
<Compile Include="UI\Utility\SignatureHighlighter.cs" />
<Compile Include="UI\UIManager.cs" />
<Compile Include="Core\Runtime\Il2Cpp\AssetBundle.cs" />
<Compile Include="Core\Unity\ColorHelper.cs" />
<Compile Include="Core\Runtime\Il2Cpp\ICallManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UI\UIFactory.cs" />
<EmbeddedResource Include="Resources\*" />
</ItemGroup>
<ItemGroup>
<None Include="ILRepack.targets" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\ILRepack.Lib.MSBuild.Task.2.0.18.1\build\ILRepack.Lib.MSBuild.Task.targets" Condition="Exists('packages\ILRepack.Lib.MSBuild.Task.2.0.18.1\build\ILRepack.Lib.MSBuild.Task.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\ILRepack.Lib.MSBuild.Task.2.0.18.1\build\ILRepack.Lib.MSBuild.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\ILRepack.Lib.MSBuild.Task.2.0.18.1\build\ILRepack.Lib.MSBuild.Task.targets'))" />
</Target>
</Project>