#if UNITY_EDITOR
using UnityEngine;

namespace XGame.Framework.Asset
{
    class SimulateAsyncMono : MonoBehaviour
    {
        static SimulateAsyncMono _instance;
        public static SimulateAsyncMono Instance
        {
            get
            {
                if (!_instance)
                {
                    _instance = new GameObject("SimulateAsync").AddComponent<SimulateAsyncMono>();
                    DontDestroyOnLoad(_instance);
                }
                return _instance;
            }
        }


        public void Init()
        {

        }

        public static void Dispose()
        {
            if (_instance != null)
            {
                _instance.StopAllCoroutines();
                DestroyImmediate(_instance);
                _instance = null;
            }
        }
    }
}
#endif