2020-08-07 22:19:03 +10:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using MelonLoader;
|
|
|
|
|
|
|
|
|
|
namespace Explorer
|
|
|
|
|
{
|
|
|
|
|
public class CppExplorer : MelonMod
|
|
|
|
|
{
|
|
|
|
|
// consts
|
|
|
|
|
|
2020-08-08 00:18:57 +10:00
|
|
|
|
public const string ID = "com.sinai.cppexplorer";
|
2020-08-18 17:11:58 +10:00
|
|
|
|
public const string VERSION = "1.3.5";
|
2020-08-07 22:19:03 +10:00
|
|
|
|
public const string AUTHOR = "Sinai";
|
|
|
|
|
|
2020-08-18 17:11:58 +10:00
|
|
|
|
public const string NAME = "IL2CPP Runtime Explorer"
|
2020-08-13 23:34:21 +10:00
|
|
|
|
#if Release_Unity2018
|
2020-08-18 17:11:58 +10:00
|
|
|
|
+ " (Unity 2018)"
|
2020-08-13 23:34:21 +10:00
|
|
|
|
#endif
|
2020-08-18 17:11:58 +10:00
|
|
|
|
;
|
2020-08-13 23:34:21 +10:00
|
|
|
|
|
2020-08-07 22:19:03 +10:00
|
|
|
|
// fields
|
|
|
|
|
|
|
|
|
|
public static CppExplorer Instance;
|
|
|
|
|
|
|
|
|
|
// props
|
|
|
|
|
|
|
|
|
|
public static bool ShowMenu { get; set; } = false;
|
2020-08-13 00:06:39 +10:00
|
|
|
|
public static int ArrayLimit { get; set; } = 20;
|
2020-08-07 22:19:03 +10:00
|
|
|
|
|
|
|
|
|
// methods
|
|
|
|
|
|
|
|
|
|
public override void OnApplicationStart()
|
|
|
|
|
{
|
|
|
|
|
base.OnApplicationStart();
|
|
|
|
|
|
|
|
|
|
Instance = this;
|
|
|
|
|
|
|
|
|
|
new MainMenu();
|
|
|
|
|
new WindowManager();
|
|
|
|
|
|
|
|
|
|
ShowMenu = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void OnLevelWasLoaded(int level)
|
|
|
|
|
{
|
2020-08-18 17:11:58 +10:00
|
|
|
|
ScenePage.Instance?.OnSceneChange();
|
|
|
|
|
SearchPage.Instance?.OnSceneChange();
|
2020-08-07 22:19:03 +10:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void OnUpdate()
|
|
|
|
|
{
|
|
|
|
|
if (Input.GetKeyDown(KeyCode.F7))
|
|
|
|
|
{
|
|
|
|
|
ShowMenu = !ShowMenu;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ShowMenu)
|
|
|
|
|
{
|
2020-08-12 03:51:47 +10:00
|
|
|
|
if (!Cursor.visible)
|
|
|
|
|
{
|
|
|
|
|
Cursor.visible = true;
|
|
|
|
|
Cursor.lockState = CursorLockMode.None;
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-07 22:19:03 +10:00
|
|
|
|
MainMenu.Instance.Update();
|
|
|
|
|
WindowManager.Instance.Update();
|
|
|
|
|
|
2020-08-18 17:11:58 +10:00
|
|
|
|
InspectUnderMouse.Update();
|
2020-08-07 22:19:03 +10:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void OnGUI()
|
|
|
|
|
{
|
|
|
|
|
base.OnGUI();
|
|
|
|
|
|
|
|
|
|
MainMenu.Instance.OnGUI();
|
|
|
|
|
WindowManager.Instance.OnGUI();
|
|
|
|
|
|
2020-08-18 17:11:58 +10:00
|
|
|
|
InspectUnderMouse.OnGUI();
|
2020-08-07 22:19:03 +10:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|