An example of a type-safe object pool for Unity.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Assets
ProjectSettings
UnityPackageManager
.gitignore
README.md

README.md

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.