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:
sinaioutlander
2020-11-13 18:46:36 +11:00
parent dc449d4a1e
commit bc113e9093
21 changed files with 450 additions and 395 deletions

View File

@ -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();
}
}
}