public GameObjectPool CreatePool(string poolName, GameObject prefab, int maxCount, int initCount, IGameObjectPoolStrategy strategy = null) { GameObjectPool pool = new GameObjectPool(); pool.InitPool(poolName, transform, prefab, maxCount, initCount, strategy); return(pool); }
public void AddPool(string poolName, GameObject prefab, int maxCount, int initCount) { if (m_PoolMap.ContainsKey(poolName)) { Log.w("Already Init GameObjectPool:" + poolName); return; } GameObjectPool cell = new GameObjectPool(); cell.InitPool(poolName, m_Parent, prefab, maxCount, initCount, m_Strategy); m_PoolMap.Add(poolName, cell); }