123456789101112131415161718192021222324252627282930313233343536373839 |
- #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
|