MagicsGames - Object Pool Manager

Documentation Link: 中文文档 English Dicument

Example Project: https://drive.google.com/file/d/15bhAsQ3hiNxT3rfOHxkEHY7sBEHWI2zB/view?usp=sharing

Exe Demo: https://drive.google.com/file/d/1GLqSEOes-7l-On6vPxbPm2VixK0d7mPN/view?usp=sharing

Discord Support: Discord QQ群: 785689421

If the plugin works well for you then please be sure to leave a review letting us know what you liked about it.

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.2.10)

- New nodes: SpawnPoolActor, ConstructPoolObject, CreateWidgetFromPool, similar to UE's SpawnActor node, with the function of setting public variables when generating;

- Fixed the problem of OnSpawn calling order when generating subclasses of Actor (after the fix, it is called after SetTransform).

V1.1.2 Update: Only check and print information about whether the interface is implemented when registering an object for the first time;

V1.1.1 Update: Added "Spawn Object From Pool (Or Spawn)" and "Spawn Objects From Pool (Or Spawn)" blueprint functions

V1.1.0 Update (2025.01.13):

en: 1. Fixed the bug of generating multiple objects:

2. Updated the generation process (added the generation option of the same frame).

3. Added a bool return value to the release to object pool function to confirm whether it can be recycled by the pool manager.

4. Added more comments.

1.0.1 Update (2024.12.03):

For objects in the pool, if not activated, the tick of the Actor Component with tick enabled is disabled by default.

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.

中文描述

V1.3.0 (2025.2.24)

  • 新增池对象Actor对物理模拟设置的支持,不再需要额外的设置;

  • 新增SpawnPoolObject和SpawnPoolObjects节点,弃用V1.2.0中新增的三个节点,因为现在已经整合到SpawnPoolObject一个节点中了,同时这三个节点将在V1.4.0中被弃用。

V1.2.1 (2025.2.14) 修复生成位置错误。

V1.2.0 (2025.2.10)- 新增节点:SpawnPoolActor、ConstructPoolObject、CreateWidgetFromPool,类似于UE的SpawnActor节点,具备在生成时设置公开变量的功能;- 修复OnSpawn,在生成Actor的子类时,调用顺序的问题(修复后为 在SetTransform之后 调用)。

V1.1.2 更新:仅在第一次注册对象时检查并打印是否实现接口的信息;

V1.1.1 更新:添加 “Spawn Object From Pool (Or Spawn)“与“Spawn Objects From Pool (Or Spawn)”蓝图函数;

v1.1.0 更新(2025.01.13):

1. 修复生成多个对象的bug:

2. 更新生成处理(增加同一帧的生成选项)。

3. 释放到对象池函数增加bool返回值,以确认是否可以被池管理器回收。

4. 增加更多注释。

V1.0.1 更新(2024.12.03):

在池中的对象,如果未激活,则默认禁用已启用Tick的Actor Component的Tick。

对象池在游戏设计中有什么用?为什么要使用对象池?

  • 对象池有助于重复使用经常出现的对象,而不是每次都创建和销毁它们。

  • 创建和销毁对象(如射弹或爆炸)可能会很慢,并且如果频繁执行,会导致游戏变慢或延迟等问题。

  • 对象池管理器通过维护对象池来缓解这些问题。池管理器不会一直创建和销毁对象,而是保留这些对象以供重复使用。这种策略提高了游戏的流畅度。

此插件实现了一个完全可用的对象池系统,支持 任意Object/Actor/UserWidget,使用起来非常简单。它速度极快,精心实现,尽可能减少开销,并使用接口来管理对象的生成与销毁事件,对现有项目也开箱即用。