A downloadable Object Pooling Kit
After some serious refinements, the JTools ObjectPooling system that's been used in all of my projects has been refined and released to the public!
Here are the features:
- Spawning and Managing GameObjects, retrieval methods including array ID, prefab name and just straight up prefab comparison. Beyond that, the pool will clear objects whenever a new scene is loaded, that way you won't run into any trouble.
- Pooled Audio Management, so your sound effects don't bog down your game. Also makes playing sounds far easier and faster than traditional means.
- Load Scene Method, so you don't have to keep typing UnityEngine.SceneManagement.SceneManager.LoadScene() out every time.
- Spawned Object Reset Configurations (currently will give you control over resetting Rigidbody, Rigidbody2D and SpriteRenderer back to their prefab states, will add additional features as requested).
- Documentation. It's essential for any tool, and the ReadMe file packaged with the kit will let you know how to get started.
This pool will not reset your own scripts. It's up to your discretion whether or not you add compatibility with the ObjectPool to your spawned objects. The most common way I reset my scripts is in the OnEnable() method, as that's called whenever the pool spawns your object into the world.
Click download now to get access to the following files: