Skip to main content

Frequently Asked Questions

Why isn't this an Object Pool?​

When you start to dig into different areas of the engine, you quickly realize, where applicable, functionally specific pooling mechanisms are present. For example, how Niagara particle systems have their instance reuse system. CommonUI instances widgets for reuse as well. In most cases, the best solution is bespoke and and most narrow one.

NEXUS: Actor Pools is geared towards providing a pattern for reuse for the common usage of AActors: they come into being, they move around and interact via some control mechanism, and then they disappear. UObjects are a few levels up in the abstraction chain and do not have such a clear lifecycle.

How do I network these things?​

The basic premise of making pooling work in a networked environment is to ensure only the host/server creates, spawns, and returns AActors from the pooling system. On the host, the AActors will be associated with the appropriate pools. On clients, they will be AActors in the world, sleeping, until activated via the server spawning them and those state changes being replicated.

tip

The default FNActorPoolSettings includes the ServerOnly flag being set. This will ensure that all functionality will only execute on the server (world authority).

How can I see stats about the NActorPools in real time?​

Whist in the editor there is a EUW wrapped version of /NexusActorPools/WB_NActorPoolsDeveloperOverlay available by going to Window > NEXUS > Actor Pools. This UWidgetBlueprint is available for usage at runtime as well!

Actor Pools

info

There is a NActorPools category added to the built-in stat system when N.ActorPools.TrackStats is toggled on. It is however not as robust in providing individual pool statistics as using the Developer Overlay method.

What's up with the scale of my spawned AActors?​

When an actor is taken from its associated pool and made active, it's scale is reset to the predefined scale set in the FNActorPools settings (FNActorPoolSettings::DefaultTransform).