mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-15 07:56:41 +08:00
A few important fixes
* Reflection on Il2CppSystem-namespace instances has been fixed * Type/Value Syntax highlighting generalized and improved globally * Scene changes now refresh the scene-picker dropdown * probably other minor stuff too
This commit is contained in:
@ -30,27 +30,15 @@ namespace UnityExplorer
|
||||
{
|
||||
Instance = this;
|
||||
|
||||
SceneManager.activeSceneChanged += DoSceneChange;
|
||||
|
||||
new ExplorerCore();
|
||||
|
||||
// HarmonyInstance.PatchAll();
|
||||
}
|
||||
|
||||
internal static void DoSceneChange(Scene arg0, Scene arg1)
|
||||
{
|
||||
ExplorerCore.OnSceneChange();
|
||||
}
|
||||
|
||||
internal void Update()
|
||||
{
|
||||
ExplorerCore.Update();
|
||||
}
|
||||
|
||||
internal void OnApplicationQuit()
|
||||
{
|
||||
DebugConsole.OnQuit();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -64,9 +52,6 @@ namespace UnityExplorer
|
||||
|
||||
public static readonly Harmony HarmonyInstance = new Harmony(ExplorerCore.GUID);
|
||||
|
||||
// temporary for Il2Cpp until scene change delegate works
|
||||
private static string lastSceneName;
|
||||
|
||||
// Init
|
||||
public override void Load()
|
||||
{
|
||||
@ -85,12 +70,7 @@ namespace UnityExplorer
|
||||
|
||||
new ExplorerCore();
|
||||
|
||||
HarmonyInstance.PatchAll();
|
||||
}
|
||||
|
||||
internal static void DoSceneChange(Scene arg0, Scene arg1)
|
||||
{
|
||||
ExplorerCore.OnSceneChange();
|
||||
// HarmonyInstance.PatchAll();
|
||||
}
|
||||
|
||||
// BepInEx Il2Cpp mod class doesn't have monobehaviour methods yet, so wrap them in a dummy.
|
||||
@ -106,18 +86,6 @@ namespace UnityExplorer
|
||||
internal void Update()
|
||||
{
|
||||
ExplorerCore.Update();
|
||||
|
||||
var scene = SceneManager.GetActiveScene();
|
||||
if (scene.name != lastSceneName)
|
||||
{
|
||||
lastSceneName = scene.name;
|
||||
DoSceneChange(scene, scene);
|
||||
}
|
||||
}
|
||||
|
||||
internal void OnApplicationQuit()
|
||||
{
|
||||
DebugConsole.OnQuit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user