mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-26 10:03:10 +08:00
Improve Il2Cpp Coroutine support, make universal ExplorerBehaviour class
This commit is contained in:
@ -1,29 +0,0 @@
|
||||
#if MONO
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityExplorer.Core.Runtime.Mono
|
||||
{
|
||||
public class DummyBehaviour : MonoBehaviour
|
||||
{
|
||||
public static DummyBehaviour Instance;
|
||||
|
||||
public static void Setup()
|
||||
{
|
||||
var obj = new GameObject("Explorer_DummyBehaviour");
|
||||
DontDestroyOnLoad(obj);
|
||||
obj.hideFlags |= HideFlags.HideAndDontSave;
|
||||
|
||||
obj.AddComponent<DummyBehaviour>();
|
||||
}
|
||||
|
||||
internal void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
@ -23,8 +23,6 @@ namespace UnityExplorer.Core.Runtime.Mono
|
||||
ExplorerCore.Context = RuntimeContext.Mono;
|
||||
Reflection = new MonoReflection();
|
||||
TextureUtil = new MonoTextureUtil();
|
||||
|
||||
DummyBehaviour.Setup();
|
||||
}
|
||||
|
||||
public override void SetupEvents()
|
||||
@ -39,7 +37,7 @@ namespace UnityExplorer.Core.Runtime.Mono
|
||||
|
||||
public override void StartCoroutine(IEnumerator routine)
|
||||
{
|
||||
DummyBehaviour.Instance.StartCoroutine(routine);
|
||||
ExplorerBehaviour.Instance.StartCoroutine(routine);
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
|
Reference in New Issue
Block a user