Simple pooling manager for Unity3D.
Simple singleton pooling manager implementation. It manages pooled gameObjects by name and can also spawn them by name. Simply attach the PoolingManager script to an empty gameObject. Objects that you wish to use in the PoolManager must be put into a subfolder in the Resources folders (Ex. Resources/Enemies). You will need to put the names of the subfolders in the PoolingManager's inspector variable "Resource Name" array. The ObjectToPool script should be attached to any gameObject you wish to pool. It will add the gameObject to the pool when it gets disabled.
Requires Unity3D
To spawn a penguin monster from your pool, you would simply use the following function:
PoolingManager.Instance.Instantiate("Penguin", Vector3.zero, Quaternion.identity);
Ut Duong โ twitter@TheUtDuong โ [email protected]
Distributed under the GPL3.0 license. See LICENSE
for more information.