Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 359 Bytes

README.md

File metadata and controls

22 lines (16 loc) · 359 Bytes

Creating a pool

GameObjectPool<MyPoolable> myPool = new GameObjectPool<MyPoolable>();
myPool.CreatePool(50, MyPrefab, true, AutoResize, 1.5f);

Spawning from a pool

if (myPool.SpawnPoolable(out MyPoolable f))
{
    // Spawn successful
}

Recycling to pool

myPoolable.Pool.RecyclePoolable(myPoolable.IndexInPool);