Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 562 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 562 Bytes

com.pixelwizards.objectpool

Object pooling system for Unity.

Documentation is online: https://www.megacrush.app/api/object-pool

No editor-facing functionality.

Create new Object pools with:

GameObject prefab;

PoolManager.AddNewObjectPool(new PoolObjectSetting()
{
	count = 10,			// number of instances to init the pool with
	prefab = prefab,	// the prefab to use
});

Get an instance from the Pool:

var instance = PoolManager.GetInstance(prefab);

Return the Instance to the Pool:

PoolManager.ReturnInstance(thisObject);