Contents

Blueprint API

Some functions of the plugin are be exposed through blueprint but the blueprint API is fairly limited. This is due to blueprint support in the Mass Entity framework. The blueprint API is curently limited to spawning and despawning and can be accessed through the spawner actor.

Spawner API

Spawner Blueprint API Preview

Spawning Groups

The following functions will create a new boid group and spawn all configured boid subsets (spawn configurations).

FunctionDetails 
Spawn GroupSchedules a spawn request of the group for which the spawner is configured.Spawn Group Preview
Spawn Group with CompletionSchedules a spawn request of the group for which the spawner is configured, with completion callback.

Parameters
Completion Callback: Event called upon spawn completion. The event returns the Id of the spawned group as well as the handles of all created boids.
Spawn Group with Completion Preview
Spawn Group ImmediateSpawns the group for which the spawner is configured immediately.
Boids are created upon function return but are not fully initialized yet. Users should preferably use the non-immediate version.

Return value
Group ID: ID of the group that was spawned or -1 if it failed.
Spawned Boids: List of boid handles that were spawned
Spawn Group Immediate Preview
Respawn GroupSchedules a respawn request for a the contents of a group associated with this spawner. This function does not despawn the group, it adds an extra batch of boids to it.Respawn Group Preview
Respawn Group ImmediateRespawn all the contents of the spawner in a group it is associated with immediately. This function does not despawn the group, it adds an extra batch of boids to it.
Boids are created upon function return but are not fully initialized yet. Users should preferably use the non-immediate version.

Return value
Spawned Boids: List of boid handles that were spawned.
Respawn Group Immediate Preview
Respawn Group with CompletionSchedules a respawn request for a the contents of a group associated with this spawner, with completion callback. This function does not despawn the group, it adds an extra batch of boids to it.

Parameters
Completion Callback: Event called upon spawn completion. The event returns the Id of the reused group as well as the handles of all created boids.
Respawn Group with Completion Preview

Spawning Subsets

A subset is a subgroup as defined in the ‘Spawn configurations’ on the spawner. Using the following Blueprint functions, you can spawn subsets individually within a previously created group.

FunctionDetails 
Spawn SubsetSchedules a spawn request for a subset of the group as configured in the spawner.

Parameters
Group ID: Id of the group in which to spawn, as returned by the ‘Spawn Group’ function variants.
Subset Index: Index of the subset configuration to spawn. This index matches the ‘Spawn configs’ list order.
Spawn Subset Preview
Spawn Subset ImmediateSpawns a subset of the group as configured in the spawner immediately.
Boids are created upon function return but are not fully initialized yet. Users should preferably use the non-immediate version.


Parameters
Group ID: Id of the group in which to spawn, as returned by the ‘Spawn Group’ function variants.
Subset Index: Index of the subset configuration to spawn. This index matches the ‘Spawn configs’ list order.

Return value
Spawned Boids: List of boid handles that were spawned.
Spawn Subset Immediate Preview
Spawn Subset with CompletionSchedules a spawn request for a subset of the group as configured in the spawner.

Parameters
Group ID: Id of the group in which to spawn, as returned by the ‘Spawn Group’ function variants.
Subset Index: Index of the subset configuration to spawn. This index matches the ‘Spawn configs’ list order.
Completion Callback: Event called upon spawn completion. The event returns the entity handles of all created boids.
Spawn Subset with Completion Preview
Spawn Subset with CountSchedules a spawn request for a subset of the group as configured in the spawner, but with the provided number of entities.

Parameters
Group ID: Id of the group in which to spawn, as returned by the ‘Spawn Group’ function variants.
Subset Index: Index of the subset configuration to spawn. This index matches the ‘Spawn configs’ list order.
Count: Number of boids to spawn.
Spawn Subset with Count Preview
Spawn Subset with Count ImmediateSpawns a subset of the group as configured in the spawner immediately.
Boids are created upon function return but are not fully initialized yet. Users should preferably use the non-immediate version.


Parameters
Group ID: Id of the group in which to spawn, as returned by the ‘Spawn Group’ function variants.
Subset Index: Index of the subset configuration to spawn. This index matches the ‘Spawn configs’ list order.
Count: Number of boids to spawn.

Return value
Spawned Boids: List of boid handles that were spawned.
Spawn Subset with Count Immediate Preview
Spawn Subset with Count and CompletionSchedules a spawn request for a subset of the group as configured in the spawner.

Parameters
Group ID: Id of the group in which to spawn, as returned by the ‘Spawn Group’ function variants.
Subset Index: Index of the subset configuration to spawn. This index matches the ‘Spawn configs’ list order.
Count: Number of boids to spawn.
Completion Callback: Event called upon spawn completion. The event returns the entity handles of all created boids.
Spawn Subset with Count and Completion Preview

Despawning Groups

You can despawn boids previously created by a spawner using one of the following functions.

FunctionDetails 
Despawn GroupSchedules a despawn request for the group with the provided ID.

Parameters
Group ID: Id of the group to despawn, as returned by the ‘Spawn Group’ variants.
Despawn Group Preview
Despawn Group ImmediateDespawn the group with the provided ID immediately. This is an unsafe call to do on the game thread as there might be background tasks currently running.
Users should preferably use the non-immediate version.

Parameters
Group ID: Id of the group to despawn, as returned by the ‘Spawn Group’ variants.
Despawn Group Immediate Preview
Despawn AllSchedules a despawn request for the all groups that were instanciated with this spawner.Despawn All Preview
Despawn All ImmediateDespawn all groups that were instanciated with this spawner immediately. This is an unsafe call to do on the game thread as there might be background tasks currently running.
Users should preferably use the non-immediate version.
Despawn All Immediate Preview

MegaBoids Subsystem API

The MegaBoids Subsystem API allows finer grained control of boids lifetime management as well as their group. You do not need a spawner to use the following functions but you will be responsible for manually spawning/despawning of created entities whereas Spawners will despawn it’s associated groups when unloaded as regular actors.

MegaBoids Subsystem Blueprint API Preview

More Blueprint functions will be provided in the future for finer control over boids. We are currently planning to add spawning and despawning without a spawner reference, optimized collision tracing, etc. in order to support more complex gameplay scenarios.

FunctionDetails 
Get Boid TransformGet the current transform for the provided boid.

Return value
Transform: The boid’s transform.
Get Boid Transform Preview
Get Boid VelocityGet the current velocity for the provided boid.

Return value
Velocity: The boid’s velocity vector.
Get Boid Velocity Preview
Get Boid Transform and VelocityGet the current transform and velocity for the provided boid.

Return value
Transform: The boid’s transform.
Velocity: The boid’s velocity vector.
Get Boid Transform and Velocity Preview
Get Boid Hit resultGets the boid that was hit by a trace hit result.

Parameters
Trace Hit Result: Hit result from a trace for which we want to determine if a boid was hit.

Return value
Boid Hit Result: Boid hit result with the handle to the boid found.
Get Boid Hit Result Preview
Despawn BoidSchedules a task to despawn the provided boid.

Parameters
Handle: Handle to the boid to despawn.
Despawn Boid Preview
Despawn BoidsSchedules a task to despawn the provided list of boids.

Parameters
Handles: List of handles to the boids to despawn.
Despawn Boids Preview

Extending the plugin & Mass Entity blueprint support

MegaBoids is a plugin based on the Mass Entity framework. Unfortunately, Mass Entity is currently not compatible with Unreal Blueprints and it seems unlikely it ever will given some core design choices from Epic when developing Mass Entity. There is currently no way to create or access data types from blueprint, since they are built upon a C++ feature called ‘templates’. Therefore, the following plugin extensions must absolutely be added through our C++ API:

  • Driving subprocessors
  • Environment subprocessors
  • Initialization subprocessors
  • Movement models

This is a good opportunity for you to learn C++. We put a lot of effort into abstracting the concepts of Mass Entity in a digestible manner such that developers can focus on what matters to them; making great games! If all else fails, check out our consulting services.


Back to top

Copyright © 2025-2026 MegaPunk Games Inc.
Demo and documentation last updated for version 0.4.0