rdInst Tutorial 13: Actor Pooling

Last Updated: 27th January 2023

As of version 1.10, rdInst provides a way to spawn actors very quickly. It uses Actor Pooling – a number of actors are pooled (in a fast way) at the beginning of play and then reused when you’re wanting to spawn them.

The Pool can either add as it goes, or be pre-allocated (fast) on play.

Step 1. Create a Blueprint based on rdActor

This first Blueprint is our Bullet Blueprint. It is simply a cylinder mesh with a glowing material. It has a function in the Tick event to move “forward” until it reaches a distance from it’s origin, then remove itself back to the Actor Pool.

Step 2. Create another Blueprint based on rdActor

This Blueprint is our base that fires the bullets, it rotates around at a fixed speed, firing at a fixed interval.

In the BeginPlay event, we simply set how many actors we want in the pool:

And the FireBullet Function, which is the part that spawns an actor from the Pool:

Step 3. Done – drag a base blueprint into your level and play.