2021-05-01 20:55:14 +10:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
#if CPP
|
|
|
|
|
using UnhollowerRuntimeLib;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
namespace UnityExplorer
|
|
|
|
|
{
|
|
|
|
|
public class ExplorerBehaviour : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
internal static ExplorerBehaviour Instance { get; private set; }
|
|
|
|
|
|
2022-04-09 18:58:56 +10:00
|
|
|
|
#if CPP
|
|
|
|
|
public ExplorerBehaviour(IntPtr ptr) : base(ptr) { }
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-05-01 20:55:14 +10:00
|
|
|
|
internal static void Setup()
|
|
|
|
|
{
|
|
|
|
|
#if CPP
|
|
|
|
|
ClassInjector.RegisterTypeInIl2Cpp<ExplorerBehaviour>();
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-04-09 18:58:56 +10:00
|
|
|
|
GameObject obj = new("ExplorerBehaviour");
|
|
|
|
|
DontDestroyOnLoad(obj);
|
|
|
|
|
obj.hideFlags = HideFlags.HideAndDontSave;
|
2021-05-01 20:55:14 +10:00
|
|
|
|
Instance = obj.AddComponent<ExplorerBehaviour>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal void Update()
|
|
|
|
|
{
|
|
|
|
|
ExplorerCore.Update();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|