AFM_Spawner
Spawns actors from definitions, with a replicated variant and a pickup dummy that hands a spawned object straight into the player's grip.
What it gives you
- Data-driven spawning from spawn definitions
- Replicated spawning through the player controller
- Spawn-to-hand for VR pickup
Required by
Description
The spawner turns "give the player one of these" into configuration. BPC_Spawner goes on any
actor - a rack, a table, a panel - and shows the spawnable as a hologram; BPC_PlayerController_ReplicatedSpawner
routes spawning through the player controller so it works in multiplayer with correct ownership.
BP_Helper_Spawn_PickupDummy is the piece that makes it feel right in VR: it presents a preview the
player can grab, and the real actor is spawned and handed to the grip at the moment of the grab, so
there is no visible pop.
Setup
- Add a
BPC_Spawnerto an actor and set Spawn Class and the Mesh Representation. - For multiplayer, add
BPC_PlayerController_ReplicatedSpawnerto your player controller.
Usage
Spawning into the player's hand
Configure the spawner with a pickup dummy. The player grabs the preview and receives the real actor.
Tracking what was spawned
BPC_Helper_SpawnedActor is added to spawned actors so the spawner can find and manage them.

Key properties
| Property | When to change |
|---|---|
| Spawn Class, Mesh Representation | What is handed out and what the hologram looks like |
| Single Instance | Only one copy at a time; the hologram stays ungrabbable until it is gone |
| Despawn Timer | How long a released copy survives |
| Reset Scale | Spawn upright at unit scale when the hologram is shrunk |
| Spawn Sound | Sound as the hologram appears and turns solid |
Extending
Bind On Actor Spawned to react to each copy, and call Update Spawner to offer a different class and mesh at runtime.
Multiplayer notes
Use the replicated spawner component so spawning is authoritative and the resulting actor is owned by the requesting player.
Example map
Map_Examples_Spawner has three tables: a shape spawner with its events and runtime show, hide, delete and restore, a rifle stand that hands out one rifle at a time, and spawning from a widget panel.
Troubleshooting
Spawned objects cannot be picked up by other players. Ownership was not set — use the replicated spawner rather than spawning directly.
API reference
Every blueprint asset in this module. Expand an asset to see its members.
Components
BPC_PlayerController_ReplicatedSpawner7 members
Player controller component that spawns replicated actors on the server and reports them back to the client that asked for them. Each request carries an identifier and the server keeps the spawned actors in a replicated buffer until the client has seen every one, which is how a client can grab an object the instant it appears. Add it to a player controller; the spawner's pickup dummy expects to find it.
| Kind | Name | Signature | Description |
|---|---|---|---|
| fn | CheckSpawnBuffer_ServerSpawn Buffer | () | Prunes buffered spawns whose actor no longer exists and schedules another pass, so the buffer stops offering clients actors that have since been destroyed. Server-side counterpart to the client check. |
| fn | CheckSpawnBuffer_ClientSpawn Buffer | () | Reports every buffered spawn whose actor has now arrived on this client through On Actor Spawned, drops those entries and schedules another pass. Run from the buffer's replication notify; entries whose actor has yet to replicate in are caught by a later pass. |
| event | Server_SpawnActor | (RequestID: Guid, Actor: class<Actor>, SpawnTransform: Transform) | Server RPC that spawns the requested class at the given transform and, when that class replicates, files it in the spawn buffer against the request ID so the asking client hears about it once it arrives. A class that does not replicate is spawned and never reported back. |
| event | SpawnAndReplicateActor | (RequestID: Guid, Actor: class<Actor>, SpawnTransform: Transform) | Asks the server to spawn an actor for this player, tagging the request with an ID the caller matches when On Actor Spawned reports the result. Called on the owning client by the pickup dummy; bind to On Actor Spawned before calling it. |
| event | RemoveSpawnBufferIndexes | (BufferElementsToRemove: int[]) | Internal helper that drops the given entries from the unconfirmed spawns and rebuilds the replicated buffer from what is left. The values are the counters recorded with each spawn, not positions in the buffer. |
| event | RetriggerSpawnBuffer_Client | () | Waits a fiftieth of a second and runs the client buffer check again, giving actors still in flight time to replicate in. Internal to the buffer loop, which stops once the buffer is empty. |
| event | RetriggerSpawnBuffer_Server | () | Waits a fiftieth of a second and runs the server buffer check again, so entries are pruned as their actors go away. Internal to the buffer loop, which stops once the buffer is empty. |
BPC_Spawner15 members
Component that hands out copies of a class: it shows the spawnable as a mesh, and gripping that mesh spawns the real actor straight into the player's hand. Add it to an actor and set Spawn Class, the mesh representation, whether only one instance may exist at a time, how long a released actor survives and the spawn sound. Update Spawner swaps the class and the preview in place, so a stand can change what it offers without being rebuilt, and replicated classes go through the player controller's replicated spawner.
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | Spawn ClassDefinition | class<Actor> | Actor class each pickup dummy spawns when a hand grabs it, passed on as every dummy is created. Change it at runtime through Update Spawner so the dummy already in place is rebuilt with it. |
| var | Mesh RepresentationDefinition | ST_Spawner_Mesh | Static mesh and relative transform of the pickup dummy standing in for the spawnable actor. The transform places the dummy against the spawner; change mesh and class together through Update Spawner. |
| var | Single InstanceDefinition | bool | Whether the replacement dummy stays an ungrabbable hologram until the actor last spawned is destroyed, rather than until the player lets go of it. Leave it off where one copy after another should be pulled from the spawner. |
| var | Despawn TimerDefinition | float | Seconds a spawned actor survives after the last hand lets go, applied through the helper component each dummy adds to the actor it spawns. Negative values keep the actor for good; use Update Despawn Timer to change it at runtime. |
| var | Reset ScaleDefinition | bool | Whether a spawned actor takes only the dummy's world location, upright and at unit scale, rather than the dummy's whole world transform. Leave it on where the dummy is shrunk or turned to sit on a panel. |
| var | Spawn SoundDefinition | SoundBase | Sound played at the centre of each pickup dummy as it appears and again as it turns from hologram back into a solid object. Leave empty for a silent spawner. |
| fn | getRepresentingMaterialDefault | (MaterialIndex: int, out DynamicMaterial: MaterialInstanceDynamic) | Returns the dynamic material at the given slot of the current pickup dummy, for tinting or fading the object on offer. Returns nothing while no dummy exists. |
| event | OnActorSpawned_Event | (Actor: Actor, PickupComponent: BPC_Interaction_Grip_Pickup) | Internal handler run once a dummy has spawned its actor: re-broadcasts the actor on On Actor Spawned, creates a fresh dummy as a hologram, and then waits either for the spawned actor to be destroyed or for it to be released, according to Single Instance, before that dummy is made solid. |
| event | CreatePickupDummy | (Hologram: bool) | Spawns a pickup dummy at the mesh representation's transform, attaches it to the spawner, hands it the class, timer, sound and hologram material, and broadcasts On Representing Mesh Spawned. Called at begin play with a solid dummy and after every spawn with a hologram one. |
| event | OnDestroyed_Event | (DestroyedActor: Actor) | Internal handler bound to the spawner's own destruction, which clears the hologram on the current dummy so one that outlives its spawner is left solid. |
| event | OnGripped_Release_Event | (SourceInfo: ST_SourceInfo) | Internal handler used while Single Instance is off, turning the waiting hologram back into a solid dummy as soon as the player lets go of the actor they spawned. |
| event | OnDestroyed_Event_0 | (DestroyedActor: Actor) | Internal handler used while Single Instance is on, turning the waiting hologram back into a solid dummy once the actor that was spawned is destroyed. |
| event | UpdateSpawner | (SpawnClass: class<Actor>, MeshRepresentation: ST_Spawner_Mesh) | Replaces the class and the mesh representation at runtime and passes both to the dummy in place, so the spawner offers a different object without being respawned. |
| event | UpdateDespawnTimer | (DespawnTimer: float) | Sets the despawn delay and pushes it straight to the dummy in place, so the next actor spawned uses the new value. Actors already spawned keep the timer they were given. |
| event | SetSpawnerState | (State: E_Spawner_State) | Shows or hides the current pickup dummy through its visibility switch, or, for delete, removes the dummy and destroys the spawner with it. Delete does nothing at all while there is no dummy, so the spawner survives. |
Helper
BPC_Helper_SpawnedActor4 members
Despawn timer added to an actor once it has been spawned from a spawner rather than placed by hand. It watches the actor's pickup coordinator: releasing the actor starts the countdown to Despawn Timer, picking it up again cancels it, and the actor is deleted through its visibility component when the time runs out. Added for you by the pickup dummy.
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | Despawn TimerSettings | float | Seconds between the last hand letting go of this actor and its deletion. Negative values switch despawning off; the count starts again on every release and is cancelled as soon as the actor is picked up. |
| event | OnActorPickup_Event | (GrabCoordinator: BPC_PickupCoordinator) | Internal handler that cancels the pending despawn when a hand takes hold of the owner, bound to the pickup coordinator at begin play. |
| event | OnActorReleased_Event | (GrabCoordinator: BPC_PickupCoordinator) | Internal handler that starts the despawn countdown once the last hand has let go, provided Despawn Timer is not negative. |
| event | Despawn | () | Deletes the owning actor once the countdown has run out, fading it out through its visibility component where it has one. Fired by the timer, but you can call it to remove a spawned actor early. |
BP_Helper_Spawn_PickupDummy12 members
Stand-in actor a spawner shows in place of the thing it spawns. Gripping it spawns the real actor, locally or through the player controller's replicated spawner, and passes the grip straight over so the object arrives already in hand. While it is a hologram its grip is blocked and the hologram material replaces the mesh's own. Spawned by the spawner rather than placed.
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | Representation MeshContent | ST_Spawner_Mesh | Static mesh and relative transform this dummy stands in for the spawnable actor with. The mesh is applied at begin play and again through Update Pickup Dummy; the transform is applied when the dummy is placed and again through Update Pickup Dummy while the dummy still sits on its spawner. |
| var | Actor to SpawnContent | class<Actor> | Actor class spawned the moment a hand grabs this dummy. Whether the class replicates decides the route: replicating classes are requested from the player controller's replicated spawner, the rest are spawned on the grabbing machine only. |
| var | Despawn TimerContent | float | Seconds after release before the spawned actor deletes itself, given to the helper component added to it as it is spawned. Negative values let the actor stay for good. |
| var | Hologram MaterialContent | MaterialInterface | Material every slot of the mesh is swapped to while the dummy is a hologram. The materials it had are stored and put back when the hologram is switched off, so leaving this empty leaves an invisible dummy in the way. |
| var | Reset ScaleContent | bool | Whether the spawned actor takes only this dummy's world location, upright and at unit scale, rather than its whole world transform. Leave it on where the dummy is shrunk or turned to suit a panel and the real object should appear at its own size. |
| var | Spawn SoundContent | SoundBase | Sound played at the centre of the dummy when it appears and again when it stops being a hologram. Leave empty for a silent dummy. |
| fn | getDummyMaterial | (InMaterialIndex: int, out OutMaterialInstanceDynamic: MaterialInstanceDynamic) | Returns a dynamic material for the given slot. While the dummy is a hologram it is the stored material the mesh reverts to once the hologram clears, created and cached on first request so tinting it does not disturb the hologram; otherwise it is the live material on the mesh. |
| fn | getSpawnTransform | () → Transform | Returns the transform the actor is spawned at: this dummy's world location with no rotation and unit scale while Reset Scale is set, otherwise the dummy's world transform as it stands. |
| fn | getMostAppropiateGripAbility | (Actor: Actor, out GripComponent: BPC_Interaction_Grip_Pickup) | Returns the first pickup grip interaction found on the given actor, which is the one the hand's grip is handed over to after spawning. Returns nothing when the actor cannot be picked up, and the spawn then goes unreported. |
| event | OnActorSpawned_Event | (RequestID: Guid, SpawnedActor: Actor) | Moves the newly spawned actor onto the spawn transform, adds the spawned actor helper carrying the despawn timer, and passes the hand's grip across to the actor's own pickup interaction so the player ends up holding the real thing. Requests whose ID is not this dummy's are ignored. |
| event | SetHologram | (Set: bool) | Turns the dummy into a hologram or back into a solid object, swapping every material for the hologram one and holding a blocker on its grip interaction while it is on. Switching it off restores the stored materials and plays Spawn Sound; asking for the state it is already in does nothing. |
| event | UpdatePickupDummy | (RepresentationMesh: ST_Spawner_Mesh, ActorToSpawn: class<Actor>) | Swaps the mesh and the class this dummy offers at runtime, applying the new static mesh at once. While the dummy still sits on its spawner the mesh definition's relative transform is applied too, so a preview of a different size or offset takes its own place; a dummy already grabbed is left where it is. |
Widgets
AFOverlay_Spawner18 members
Overlay putting a spawner in front of a three-dimensional widget: wrap it around the content and it spawns the spawner actor at Relative Distance From Widget, then keeps it shown, hidden or deleted as the widget appears, is covered by an overlay or is switched away. Set the spawn class and the mesh representation here rather than on the spawner itself.
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | Spawn ClassSettings | class<Actor> | Actor class handed to the spawner at the moment this element creates it. Editing it afterwards leaves an existing spawner untouched; go through Update Spawner on the spawner itself to change what is on offer at runtime. |
| var | Mesh RepresentationSettings | ST_Spawner_Mesh | Static mesh and relative transform of the pickup dummy that stands in for the spawnable actor, passed to the spawner as it is created. The transform positions the dummy against the spawner rather than against the panel. |
| var | Single InstanceSettings | bool | Whether the next dummy stays an ungrabbable hologram until the actor last spawned is destroyed, rather than until it is released. Passed to the spawner when this element creates it. |
| var | Despawn TimerSettings | float | Seconds a spawned actor survives after the last hand lets go, handed to the spawner and on to every actor it produces. Negative values keep the actor indefinitely. |
| var | Relative Distance from WidgetSettings|Layout | float | Distance in centimetres the spawner stands in front of the widget surface, used as the forward axis of its relative transform. Raise it to keep the offered object clear of the panel. |
| var | Anchor Of WidgetSettings|Layout | Vector2D | Anchor on this element, in fractions of its own size, from which the spawner's position across the widget plane is measured. Leave at zero to measure from the top-left corner of the element. |
| var | ActiveState | bool | Whether this element keeps a spawner alive at all. Switch it with Set Active rather than writing it directly, since clearing it deletes the spawner and its dummy and setting it starts the visibility loop again. |
| var | Spawn SoundSettings|Sound | SoundBase | Sound played at the centre of each pickup dummy as it appears and again as it turns from hologram back into a solid object. Passed to the spawner on creation; leave empty for a silent spawner. |
| fn | getRepresentingMaterial | (MaterialIndex: int, out DynamicMaterial: MaterialInstanceDynamic) | Returns the dynamic material at the given slot of the spawner's current pickup dummy, so the panel can tint or fade the object it is offering. Returns nothing until the spawner has been created. |
| fn | canBeVisible | (out Visible: E_Spawner_State) | Returns whether the spawner should show, hide or be deleted. Showing needs the element to be active, laid out with a real size, the widget component visible, no switcher hiding it and no overlay open in front of it; an inactive or unlaid-out element asks for deletion instead of a hide. |
| fn | getRelativeTransform | () → Transform | Returns the transform the spawner is placed at, standing Relative Distance From Widget in front of the widget plane and lined up with this element's position across it. Rotation is zero and the relative scale is a hundred, which undoes the shrink a widget component applies so the object appears at world size. |
| event | OnWidgetVisibilityChanged_Event_0 | () | Internal handler bound to the widget component's own visibility change, which re-runs the visibility check so the spawner follows the panel it belongs to. |
| event | OnVisibilityChanged_Event | (InVisibility: ESlateVisibility) | Internal handler bound to the parent widget's visibility change, which re-runs the visibility check. |
| event | SetActive | (Set: bool) | Switches the element on or off and re-runs the visibility check. While on it keeps re-checking every 0.1 seconds, so the spawner tracks the panel; passing false runs one last check, which deletes the spawner along with its dummy. |
| event | CheckVisibility | () | Applies the result of Can Be Visible: creates the spawner on the first show and attaches it to the widget component, otherwise moves it back into place, or tells it to hide or delete itself. A deleted spawner is created afresh the next time showing is allowed. |
| event | OnOverlayOpened_Event | () | Internal handler bound to the widget component's overlay notification, which re-runs the visibility check so the spawner stands down while an overlay is open in front of the panel. |
| event | OnRepresentingMeshSpawned_Event | () | Internal handler that forwards the spawner's notification of a new pickup dummy to On Representing Mesh Spawned on this element. Bind to it if the dummy's materials need restyling each time one appears. |
| event | ActorSpawned | (Actor: Actor) | Internal handler that forwards the spawner's notification of a spawned actor to On Actor Spawned on this element, so other widgets can bind here rather than to the spawner it owns. |