mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-19 23:37:39 +08:00

- Use explicit type of var - Use 'new()' - Remove unnecessary usings - Sort usings - Apply formatting
34 lines
752 B
C#
34 lines
752 B
C#
using UnityEngine;
|
|
#if CPP
|
|
using UnhollowerRuntimeLib;
|
|
#endif
|
|
|
|
namespace UnityExplorer
|
|
{
|
|
public class ExplorerBehaviour : MonoBehaviour
|
|
{
|
|
internal static ExplorerBehaviour Instance { get; private set; }
|
|
|
|
#if CPP
|
|
public ExplorerBehaviour(System.IntPtr ptr) : base(ptr) { }
|
|
#endif
|
|
|
|
internal static void Setup()
|
|
{
|
|
#if CPP
|
|
ClassInjector.RegisterTypeInIl2Cpp<ExplorerBehaviour>();
|
|
#endif
|
|
|
|
GameObject obj = new("ExplorerBehaviour");
|
|
DontDestroyOnLoad(obj);
|
|
obj.hideFlags = HideFlags.HideAndDontSave;
|
|
Instance = obj.AddComponent<ExplorerBehaviour>();
|
|
}
|
|
|
|
internal void Update()
|
|
{
|
|
ExplorerCore.Update();
|
|
}
|
|
}
|
|
}
|