1. ObjectPoolInterface
2. Blueprint Node
3. Using in C++
What is the use of object pools in game design? Why use object pools?
- Object pools help reuse frequently occurring objects instead of creating and destroying them every time.
- Creating and destroying objects, such as projectiles or explosions, can be slow and, if done frequently, can cause problems such as slowdowns or lags in the game.
- Object pool managers mitigate these problems by maintaining object pools. Instead of creating and destroying objects all the time, the pool manager keeps these objects for reuse. This strategy improves the smoothness of the game.
This plugin implements a fully usable object pool system that supports AnyObject/Actor/UserWidget and is very simple to use. It is extremely fast, carefully implemented to minimize overhead, and uses interfaces to manage object generation and destruction events, and can be used out of the box for existing projects.
Update log:
V1.3.0 (2025.2.24)
- Added support for physics simulation settings for pool object Actor, no additional settings are required;
- Added SpawnPoolObject and SpawnPoolObjects nodes, and deprecated the three nodes added in V1.2.0 because they are now integrated into one node, SpawnPoolObject. At the same time, these three nodes will be deprecated in V1.4.0.
V1.2.1 (2025.2.14)
Fixed the spawn position error.
V1.2.0 (2025.02.10)
- New nodes: SpawnPoolActor, ConstructPoolObject, CreateWidgetFromPool, similar to UE's SpawnActor node, with the function of setting public variables at spawning time;
- Fixed the call order of OnSpawn when spawning subclasses of Actor (after the fix, it is called after SetTransform).
V1.1.2
Only check and print the information of whether the interface is implemented when registering the object for the first time;