mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-13 23:36:35 +08:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
6f44a3376b | |||
3a6b573ac3 | |||
cbe17927fb | |||
15f3f37948 | |||
de6760e427 |
Binary file not shown.
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "com.sinai-dev.unityexplorer",
|
"name": "com.sinai-dev.unityexplorer",
|
||||||
"version": "4.7.7",
|
"version": "4.7.8",
|
||||||
"displayName": "UnityExplorer",
|
"displayName": "UnityExplorer",
|
||||||
"description": "An in-game UI for exploring, debugging and modifying Unity games.",
|
"description": "An in-game UI for exploring, debugging and modifying Unity games.",
|
||||||
"unity": "2017.1",
|
"unity": "2017.1",
|
||||||
|
@ -54,6 +54,10 @@ namespace UnityExplorer.Config
|
|||||||
Handler.LoadConfig();
|
Handler.LoadConfig();
|
||||||
InternalHandler.LoadConfig();
|
InternalHandler.LoadConfig();
|
||||||
|
|
||||||
|
#if STANDALONE
|
||||||
|
Loader.Standalone.ExplorerEditorBehaviour.Instance.LoadConfigs();
|
||||||
|
#endif
|
||||||
|
|
||||||
//InitConsoleCallback();
|
//InitConsoleCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
using UnityEngine;
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityExplorer.UI;
|
||||||
|
using UniverseLib;
|
||||||
#if CPP
|
#if CPP
|
||||||
using UnhollowerRuntimeLib;
|
using UnhollowerRuntimeLib;
|
||||||
#endif
|
#endif
|
||||||
@ -29,5 +33,39 @@ namespace UnityExplorer
|
|||||||
{
|
{
|
||||||
ExplorerCore.Update();
|
ExplorerCore.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For editor, to clean up objects
|
||||||
|
|
||||||
|
internal void OnDestroy()
|
||||||
|
{
|
||||||
|
OnApplicationQuit();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal bool quitting;
|
||||||
|
|
||||||
|
internal void OnApplicationQuit()
|
||||||
|
{
|
||||||
|
if (quitting) return;
|
||||||
|
quitting = true;
|
||||||
|
|
||||||
|
TryDestroy(UIManager.UIRoot?.transform.root.gameObject);
|
||||||
|
|
||||||
|
TryDestroy((typeof(Universe).Assembly.GetType("UniverseLib.UniversalBehaviour")
|
||||||
|
.GetProperty("Instance", BindingFlags.Static | BindingFlags.NonPublic)
|
||||||
|
.GetValue(null, null)
|
||||||
|
as Component).gameObject);
|
||||||
|
|
||||||
|
TryDestroy(this.gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void TryDestroy(GameObject obj)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (obj)
|
||||||
|
Destroy(obj);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ namespace UnityExplorer
|
|||||||
public static class ExplorerCore
|
public static class ExplorerCore
|
||||||
{
|
{
|
||||||
public const string NAME = "UnityExplorer";
|
public const string NAME = "UnityExplorer";
|
||||||
public const string VERSION = "4.7.7";
|
public const string VERSION = "4.7.8";
|
||||||
public const string AUTHOR = "Sinai";
|
public const string AUTHOR = "Sinai";
|
||||||
public const string GUID = "com.sinai.unityexplorer";
|
public const string GUID = "com.sinai.unityexplorer";
|
||||||
|
|
||||||
|
@ -6,27 +6,53 @@ using System.Linq;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityExplorer.Config;
|
||||||
|
using UnityExplorer.UI;
|
||||||
|
using UniverseLib;
|
||||||
|
|
||||||
namespace UnityExplorer.Loader.Standalone
|
namespace UnityExplorer.Loader.Standalone
|
||||||
{
|
{
|
||||||
public class ExplorerEditorBehaviour : MonoBehaviour
|
public class ExplorerEditorBehaviour : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
internal static ExplorerEditorBehaviour Instance { get; private set; }
|
||||||
|
|
||||||
|
public bool Hide_On_Startup = true;
|
||||||
|
public KeyCode Master_Toggle_Key = KeyCode.F7;
|
||||||
|
public UIManager.VerticalAnchor Main_Navbar_Anchor = UIManager.VerticalAnchor.Top;
|
||||||
|
public bool Log_Unity_Debug = false;
|
||||||
|
public float Startup_Delay_Time = 1f;
|
||||||
|
public KeyCode World_MouseInspect_Keybind;
|
||||||
|
public KeyCode UI_MouseInspect_Keybind;
|
||||||
|
public bool Force_Unlock_Mouse = true;
|
||||||
|
public KeyCode Force_Unlock_Toggle;
|
||||||
|
public bool Disable_EventSystem_Override;
|
||||||
|
|
||||||
internal void Awake()
|
internal void Awake()
|
||||||
{
|
{
|
||||||
|
Instance = this;
|
||||||
|
|
||||||
ExplorerEditorLoader.Initialize();
|
ExplorerEditorLoader.Initialize();
|
||||||
DontDestroyOnLoad(this);
|
DontDestroyOnLoad(this);
|
||||||
this.gameObject.hideFlags = HideFlags.HideAndDontSave;
|
this.gameObject.hideFlags = HideFlags.HideAndDontSave;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void OnDestroy()
|
|
||||||
{
|
|
||||||
OnApplicationQuit();
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void OnApplicationQuit()
|
internal void OnApplicationQuit()
|
||||||
{
|
{
|
||||||
if (UI.UIManager.UIRoot)
|
Destroy(this.gameObject);
|
||||||
Destroy(UI.UIManager.UIRoot.transform.root.gameObject);
|
}
|
||||||
|
|
||||||
|
internal void LoadConfigs()
|
||||||
|
{
|
||||||
|
ConfigManager.Hide_On_Startup.Value = this.Hide_On_Startup;
|
||||||
|
ConfigManager.Master_Toggle.Value = this.Master_Toggle_Key;
|
||||||
|
ConfigManager.Main_Navbar_Anchor.Value = this.Main_Navbar_Anchor;
|
||||||
|
ConfigManager.Log_Unity_Debug.Value = this.Log_Unity_Debug;
|
||||||
|
ConfigManager.Startup_Delay_Time.Value = this.Startup_Delay_Time;
|
||||||
|
ConfigManager.World_MouseInspect_Keybind.Value = this.World_MouseInspect_Keybind;
|
||||||
|
ConfigManager.UI_MouseInspect_Keybind.Value = this.UI_MouseInspect_Keybind;
|
||||||
|
ConfigManager.Force_Unlock_Mouse.Value = this.Force_Unlock_Mouse;
|
||||||
|
ConfigManager.Force_Unlock_Toggle.Value = this.Force_Unlock_Toggle;
|
||||||
|
ConfigManager.Disable_EventSystem_Override.Value = this.Disable_EventSystem_Override;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ namespace UnityExplorer.Loader.Standalone
|
|||||||
protected override void CheckExplorerFolder()
|
protected override void CheckExplorerFolder()
|
||||||
{
|
{
|
||||||
if (explorerFolderDest == null)
|
if (explorerFolderDest == null)
|
||||||
explorerFolderDest = Application.dataPath;
|
explorerFolderDest = Path.GetDirectoryName(Application.dataPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,6 +119,8 @@ namespace UnityExplorer.UI.Panels
|
|||||||
{
|
{
|
||||||
Rect.SetAnchorsFromString(split[1]);
|
Rect.SetAnchorsFromString(split[1]);
|
||||||
Rect.SetPositionFromString(split[2]);
|
Rect.SetPositionFromString(split[2]);
|
||||||
|
this.EnsureValidSize();
|
||||||
|
this.EnsureValidPosition();
|
||||||
this.SetActive(bool.Parse(split[0]));
|
this.SetActive(bool.Parse(split[0]));
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
@ -26,7 +26,6 @@ namespace UnityExplorer.UI
|
|||||||
Options,
|
Options,
|
||||||
ConsoleLog,
|
ConsoleLog,
|
||||||
AutoCompleter,
|
AutoCompleter,
|
||||||
//MouseInspector,
|
|
||||||
UIInspectorResults,
|
UIInspectorResults,
|
||||||
HookManager,
|
HookManager,
|
||||||
Clipboard,
|
Clipboard,
|
||||||
|
@ -79,11 +79,11 @@
|
|||||||
<!-- il2cpp nuget -->
|
<!-- il2cpp nuget -->
|
||||||
<ItemGroup Condition="'$(Configuration)'=='ML_Cpp_net6' or '$(Configuration)'=='ML_Cpp_net472' or '$(Configuration)'=='STANDALONE_Cpp' or '$(Configuration)'=='BIE_Cpp'">
|
<ItemGroup Condition="'$(Configuration)'=='ML_Cpp_net6' or '$(Configuration)'=='ML_Cpp_net472' or '$(Configuration)'=='STANDALONE_Cpp' or '$(Configuration)'=='BIE_Cpp'">
|
||||||
<PackageReference Include="Il2CppAssemblyUnhollower.BaseLib" Version="0.4.22" IncludeAssets="compile" />
|
<PackageReference Include="Il2CppAssemblyUnhollower.BaseLib" Version="0.4.22" IncludeAssets="compile" />
|
||||||
<PackageReference Include="UniverseLib.IL2CPP" Version="1.3.9" />
|
<PackageReference Include="UniverseLib.IL2CPP" Version="1.3.10" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<!-- mono nuget -->
|
<!-- mono nuget -->
|
||||||
<ItemGroup Condition="'$(Configuration)'=='BIE6_Mono' or '$(Configuration)'=='BIE5_Mono' or '$(Configuration)'=='ML_Mono' or '$(Configuration)'=='STANDALONE_Mono'">
|
<ItemGroup Condition="'$(Configuration)'=='BIE6_Mono' or '$(Configuration)'=='BIE5_Mono' or '$(Configuration)'=='ML_Mono' or '$(Configuration)'=='STANDALONE_Mono'">
|
||||||
<PackageReference Include="UniverseLib.Mono" Version="1.3.9" />
|
<PackageReference Include="UniverseLib.Mono" Version="1.3.10" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- ~~~~~ ASSEMBLY REFERENCES ~~~~~ -->
|
<!-- ~~~~~ ASSEMBLY REFERENCES ~~~~~ -->
|
||||||
|
Reference in New Issue
Block a user