示例#1
0
 /// <summary>
 /// Despawn the specified gameobject back into its pool after a delay
 /// </summary>
 public static void Despawn(GameObject obj, int after)
 {
     Task.Delay(after).ContinueWith(t => UnityMainThreadDispatcher.Instance().Enqueue(() => Despawn(obj)));
 }
 void OnDestroy()
 {
     _instance = null;
 }