/TypeSafeObjectPool

An example of a type-safe object pool for Unity.

Primary LanguageC#The UnlicenseUnlicense

TypeSafeObjectPool

This project is an example of a type-safe object pool for Unity. This was written as a companion to the blog post here:

https://www.horsedrawngames.com/type-safe-object-pool-for-unity/

To see the example, load the TypeSafeObjectPool scene in Unity and hit play. Click anywhere in the game window to spawn a particle effect pulled from the pool.

To see an example of a non-type safe object pool, load the BasicObjectPool scene.

The type-safe generic object pool is ObjectPool. The non-type safe version is BasicObjectPool.