Using TinyPool is very easy.
TinyPool.Initialize();
TinyPool.CreatePool((GameObject)Prefab,
(string)PoolID,
(int)InitialPoolSize,
(int)maxPoolSize=50,
(GameObject)objectsParent);
GameObject spawned = TinyPool.Spawn((string)PoolID,
(Vector3)Position,
(Quaternion)Rotation,
(Vector3)Scale);
TinyPool.Destroy((string)PoolID, (GameObject)pooledObject);
TinyPool.ExpandPool((string)PoolID, (GameObject)pooledObject);
Just add this class to your Unity project.
- You have to call Initialize() just once and before any other TinyPool function.
- You can create any number of pools at the same time, just be aware of givin them a different PoolID.
Feel free to use this library whatever you want whenever you want.
You can reach me at twitter @c4m170 for any questions.