예제 #1
0
 public static void Destroy()
 {
     if (_this)
     {
         StopAll();
         _this = null;
     }
 }
예제 #2
0
 public static Coroutine Run(IEnumerator func)
 {
     if (_this == null)
     {
         GameObject target = new GameObject("COROUTINES");
         target.hideFlags = HideFlags.HideAndDontSave;
         UnityEngine.Object.DontDestroyOnLoad(target);
         _this = target.AddComponent <CoreCoroutines>();
     }
     return(_this.StartCoroutine(func));
 }
예제 #3
0
 public static Coroutine Run(IEnumerator function)
 {
     if (_this == null)
     {
         GameObject go = new GameObject("~COROUTINES");
         GameObject.DontDestroyOnLoad(go);
         go.hideFlags = HideFlags.HideAndDontSave;
         _this        = go.AddComponent <CoreCoroutines>();
     }
     return(_this.StartCoroutine(function));
 }
예제 #4
0
 public static Coroutine Run(IEnumerator function)
 {
     if (_this == null)
     {
         GameObject target = new GameObject("COROUTINES");
         target.hideFlags = HideFlags.HideAndDontSave;
         UnityEngine.Object.DontDestroyOnLoad(target);
         _this = target.AddComponent<CoreCoroutines>();
     }
     return _this.StartCoroutine(function);
 }