Improve Il2Cpp Coroutine support, make universal ExplorerBehaviour class

This commit is contained in:
Sinai
2021-05-01 20:55:14 +10:00
parent d6cde68a44
commit ab8b736f7e
13 changed files with 112 additions and 98 deletions

View File

@ -87,30 +87,10 @@ namespace UnityExplorer
Instance = this;
_configHandler = new StandaloneConfigHandler();
#if CPP
ClassInjector.RegisterTypeInIl2Cpp<ExplorerBehaviour>();
#endif
var obj = new GameObject("ExplorerBehaviour");
obj.AddComponent<ExplorerBehaviour>();
GameObject.DontDestroyOnLoad(obj);
obj.hideFlags = HideFlags.HideAndDontSave;
ExplorerCore.Init(this);
}
public class ExplorerBehaviour : MonoBehaviour
{
#if CPP
public ExplorerBehaviour(IntPtr ptr) : base(ptr) { }
#endif
internal void Update()
{
ExplorerCore.Update();
}
}
public void SetupPatches()
public void SetupCursorPatches()
{
try
{