Spawn Actor Async
- Base:
- UBlueprintAsyncActionBase
- Type:
- UNSpawnActorBlueprintAsyncAction
- Header File:
- NexusActorPools/Public/NSpawnActorBlueprintAsyncAction.h
An async Blueprint action that takes a TSoftClassPtr<AActor>, streams it in, ensures a FNActorPool exists for it, and then spawns an AActor at the supplied position and rotation. Like its sibling Get Actor Async, its purpose is to decouple hard references to Actor classes while still placing the resulting AActor into the world in a single step.
When To Use It​
- Loading Decoupling: The Actor class is referenced as a soft asset; the action handles the load before spawning.
- First-Use Cost Hiding: If no FNActorPool exists for the class yet, one is created on-demand using the project's Default Settings. The async action moves that work off the calling frame.
- Reference Without Spawn: If you want the
AActorreturned without being placed in the world, use Get Actor Async instead. If you already hold a hard reference to the class, callSpawnActoron the UNActorPoolSubsystem directly.
Blueprint Surface​
| Input | Description |
|---|---|
ActorClass | TSoftClassPtr<AActor> to load and spawn from a pool. |
Position | World-space position to spawn the AActor at. |
Rotation | World-space rotation to apply to the spawned AActor. |
| Pin | Fires When | Payload |
|---|---|---|
Completed | The class finishes loading and the subsystem spawns an AActor from the pool. | SpawnedActor — the spawned AActor, or null on failure. |
The pin always fires exactly once. Check SpawnedActor for null before using it.
Notes​
- Honors all the pool flags of the resolved pool. In particular:
ServerOnlypools will returnnullon clients.SweepBeforeSettingLocationis applied to the spawn transform.ShouldFinishSpawningcontrols whetherFinishSpawning()is invoked for non-INActorPoolItem classes.
- The
Strategyconfigured on the pool determines what happens if the pool is exhausted — see Creation Strategies. A strategy ofCreateLimitedorFixed(without recycle) will returnnullrather than allocate a newAActor.