UnityExplorer/src/ExplorerBehaviour.cs
Sinai 7e0f98ef91 Automatic code cleanup (no real changes)
- Use explicit type of var
- Use 'new()'
- Remove unnecessary usings
- Sort usings
- Apply formatting
2022-04-12 05:20:35 +10:00

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