void Awake() { _instance = this; if (startupPoolMode == StartupPoolMode.Awake) { CreateStartupPools(); } }
public static void RecycleAll(this GameObject prefab) { NetObjectPool.RecycleAll(prefab); }
public static void RecycleAll <T>(this T prefab) where T : Component { NetObjectPool.RecycleAll(prefab); }
public static void CreatePool <T>(this T prefab) where T : Component { NetObjectPool.CreatePool(prefab, 0); }
public static void DestroyAll(this GameObject prefab) { NetObjectPool.DestroyAll(prefab); }
public static List <T> GetPooled <T>(this T prefab, List <T> list, bool appendList) where T : Component { return(NetObjectPool.GetPooled(prefab, list, appendList)); }
public static List <GameObject> GetPooled(this GameObject prefab, List <GameObject> list) { return(NetObjectPool.GetPooled(prefab, list, false)); }
public static List <T> GetSpawned <T>(this T prefab, List <T> list) where T : Component { return(NetObjectPool.GetSpawned(prefab, list, false)); }
public static GameObject Spawn(this GameObject prefab, Transform parent, Vector3 position, Quaternion rotation) { return(NetObjectPool.Spawn(prefab, parent, position, rotation)); }
public static T Spawn <T>(this T prefab) where T : Component { return(NetObjectPool.Spawn(prefab, null, Vector3.zero, Quaternion.identity)); }
public static T Spawn <T>(this T prefab, Transform parent) where T : Component { return(NetObjectPool.Spawn(prefab, parent, Vector3.zero, Quaternion.identity)); }
public static T Spawn <T>(this T prefab, Vector3 position, Quaternion rotation) where T : Component { return(NetObjectPool.Spawn(prefab, null, position, rotation)); }
public static void CreatePool(this GameObject prefab, int initialPoolSize) { NetObjectPool.CreatePool(prefab, initialPoolSize); }
public static void CreatePool(this GameObject prefab) { NetObjectPool.CreatePool(prefab, 0); }
public static void CreatePool <T>(this T prefab, int initialPoolSize) where T : Component { NetObjectPool.CreatePool(prefab, initialPoolSize); }
public static int CountSpawned <T>(this T prefab) where T : Component { return(NetObjectPool.CountSpawned(prefab)); }
public static int CountSpawned(this GameObject prefab) { return(NetObjectPool.CountSpawned(prefab)); }
public static GameObject Spawn(this GameObject prefab, Vector3 position) { return(NetObjectPool.Spawn(prefab, null, position, Quaternion.identity)); }
public static List <GameObject> GetPooled(this GameObject prefab, List <GameObject> list, bool appendList) { return(NetObjectPool.GetPooled(prefab, list, appendList)); }
public static GameObject Spawn(this GameObject prefab, Transform parent) { return(NetObjectPool.Spawn(prefab, parent, Vector3.zero, Quaternion.identity)); }
public static List <GameObject> GetPooled(this GameObject prefab) { return(NetObjectPool.GetPooled(prefab, null, false)); }
public static GameObject Spawn(this GameObject prefab) { return(NetObjectPool.Spawn(prefab, null, Vector3.zero, Quaternion.identity)); }
public static List <T> GetPooled <T>(this T prefab) where T : Component { return(NetObjectPool.GetPooled(prefab, null, false)); }
public static void Recycle <T>(this T obj) where T : Component { NetObjectPool.Recycle(obj); }
public static void DestroyAll <T>(this T prefab) where T : Component { NetObjectPool.DestroyAll(prefab.gameObject); }
public static void Recycle(this GameObject obj) { NetObjectPool.Recycle(obj); }