Dynamic Object Pool
Wise Monk Studios
$0.0
Date |
Price |
---|---|
Date |
Price($) |
03/18(2018) |
0.0 |
11/25(2024) |
0.0 |
Jump AssetStore
Finally an object pool that can grow and shrink dynamically based on your own configurations. Perfect for mobile!
-- What is an object pool? --
Frequently Instantiating and Destroying objects in a scene can drastically decrease performance. Therefore, we create an object pool (quite literally a pool of objects) that we can activate and deactivate when needed instead of instantiating and destroying.
-- What makes Dynamic Object Pool better? --
Most object pools are either fixed in size (you can only ever have X number of bullets active at a given moment) or they grow as needed with sharp lag spikes, never deleting objects in the pool to free up memory when the objects are not used.
Dynamic Object Pool creates new objects on the fly when a certain threshold is reached, ensuring no lag spikes. Also, Dynamic Object Pool will destroy objects on the fly if they are not being used. Everything is customizable to best fit your needs [even more customization will be added in later releases].
-- How does it work? --
You can set 3 thresholds: Bottom, Middle, and Top. At any time, if the percent of active objects from the pool hits the bottom or top thresholds, the object pool will begin to dynamically create or destroy objects to get the number back to the middle threshold. Try out the demo for more info.
-- How do I use it? --
It's as simple as creating a class that inherits from the BetterObjectPool class. Then you can customize your settings right in the Unity Inspector. Clear documentation and examples are provided in the package.
Web Player Demo