How to use

To use this system – you should just:

  1. Add PoolManager script to any object and specify list (and quantity) of objects you’d like to preload.
  2. If needed - for this list assign prefabs of objects to preload(generate objects on Start)
  3. It’s ready! 

You can extract preloaded or manually pooled objects using functions:

  • GetObjectByName (objectName: String)
  • GetObjectByID (id: int)

You can pool any objects manually by function:

  • PoolObject (object: GameObject, PreloadedTypeOnly: boolean)

ADDITIONAL: Assign pooledObject script to any object (and set any existing PoolManager to parentPool property) to make this object pool-back to parentPool automatically onDIsable event.