Efficient and elegant object pooler for GameObjects. The system is based on an entirely static helper class with easily accessible extension methods. The helper class automatically manages the pools for you, but you can also use the pools directly for full control. Commented source code and examples included.
Features:
- Can easily handle thousands of objects.
- Fully automatic. No tedious manual setup required.
- Simple to use with extension methods: replace Instantiate(prefab) with prefab.Spawn(), and Destroy(go) with go.Recycle().
- Automatic parenting (optional).
- Prefabrication and releasing by demand.
- Callbacks and C# events for resetting the objects. Unity callbacks can be used as well.
- Garbage-free events on object creation, destruction, activation, and inactivation.
Note:
- This asset includes Event Propagators
- If you also use Collision Propagators, please import it before installing GameObjectPooler, because Collision Propagators uses a stripped-down version of PrefabSpawner script.