ArmanDoesStuff - Actor Pool

My take on an Object pooling system for Unreal Engine 5. Written in C++ and fully integrated with Blueprints for ease of use, comes with an example map/character.

Simple, efficient, and easy to use. With this Unreal Object Pool, you can easily replace any calls to SpawnActor and save on processing power by reusing old actors.

How to Use

  1. Create a Poolable Actor

    Create a PoolableActor. The root should be a primitive component but it should work, regardless.

  2. Get Actor from pool

    Call GetPoolableActor. If there is a waiting PoolableActor it will activate it, if not, it will spawn one.

  3. Reset Actor with OnActorGet

    A new OnActorGet event is available to replace BeginPlay. Use this to reset any changes that may have been made to the actor before deactivating.

  4. Release Actor to the Pool

    Instead of destroying it, call Release to return it to the ActorPool, making it ready for the next time you call GetActor.