---
title: AFM_Spawner
product: Advanced Framework Pro
version: 1.0
engine: Unreal Engine 5.8
updated: 2026-10-05
canonical: https://docs.human-codeable.com/plugins/afm-spawner.html
---

Module

# 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

#### Requires

None

#### Required by

None

5 assets56 API members

## Description

The spawner turns "give the player one of these" into configuration. `BP_Spawner` holds spawn definitions and produces actors on demand; `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

1. Enable `AFM_Spawner`.
2. Place a `BP_Spawner` and fill in its spawn definitions.
3. For multiplayer, add `BPC_PlayerController_ReplicatedSpawner` to 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.

[![A freshly spawned object already in the player’s hand](../images/AFM_Spawner_result-1600.webp?v=0291ee46)](../images/AFM_Spawner_result-1600.webp?v=0291ee46)

A freshly spawned object already in the player’s hand

## Key properties

| Property | When to change |
|---|---|
| Spawn definitions | What can be spawned and with what mesh preview |
| Spawner state | Controls availability and cooldown |

## Extending

Derive from `BP_Spawner` for custom spawn rules; `ST_SpawnDef` describes each entry.

## Multiplayer notes

Multiplayer

Use the replicated spawner component so spawning is authoritative and the resulting actor is owned by the requesting player.

## Example map

`Map_Examples_Spawner` demonstrates spawn-to-hand and replicated spawning.

## 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 plugin. Expand an asset to see its members.

### Components

**BPC_PlayerController_ReplicatedSpawner**7 members

extends `ActorComponent` · implements `OutsidePawnRPCInterface`

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_Server`Spawn 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_Client`Spawn 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_Spawner**15 members

extends `SceneComponent`

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 Class`Definition | `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 Representation`Definition | `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 Instance`Definition | `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 Timer`Definition | `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 Scale`Definition | `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 Sound`Definition | `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 | `getRepresentingMaterial`Default | `(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)` | Called by the dummy once the real actor has been spawned and handed to the hand. Raises the On Actor Spawned dispatcher for your own graphs, builds the next dummy as a hologram, and then waits: with Single Instance on, for the spawned actor to be destroyed; with it off, for the actor to be released. Whichever arrives takes the hologram off and makes the stand grabbable again. |
| event | `CreatePickupDummy` | `(Hologram: bool)` | Builds the stand-in the spawner shows. Spawns a pickup dummy at the component, handing it the mesh representation, the spawn class, the despawn timer, the hologram material, the reset scale and the spawn sound, attaches it, binds its pickup to On Actor Spawned Event and sets whether it starts as a hologram. Called once from Begin Play with false, and again with true after every spawn, which is why a fresh stand is standing there the moment one is taken. |
| event | `OnDestroyed_Event` | `(DestroyedActor: Actor)` | The single instance path. Bound to the spawned actor's destruction and clears the hologram from the waiting dummy, so the stand offers another object only once the last one is gone. |
| event | `OnGripped_Release_Event` | `(SourceInfo: ST_SourceInfo)` | The path taken when Single Instance is off. Bound to the spawned actor's grip release and clears the hologram from the waiting dummy, so putting one object down is what makes the next one available. |
| event | `OnDestroyed_Event_0` | `(DestroyedActor: Actor)` | Bound at Begin Play to the owning actor's destruction and deletes the current dummy along with it. The dummy is a separate actor attached to this component rather than a child of the owner, so without this it would be left standing after the spawner itself is gone. |
| event | `UpdateSpawner` | `(SpawnClass: class<Actor>, MeshRepresentation: ST_Spawner_Mesh)` | Changes what the spawner offers: stores the new class and mesh representation and tells the live dummy to update itself, so the stand changes in place rather than being torn down and rebuilt. Driving this from a state component is how the showroom spawner switches between types. |
| event | `UpdateDespawnTimer` | `(DespawnTimer: float)` | Changes how long a spawned object survives after it is put down. Stores the new value and writes it into the live dummy, which is what passes it on to the next object spawned. Objects already in the world keep the timer they were handed. |
| event | `SetSpawnerState` | `(State: E_Spawner_State)` | Switches the spawner between its three states. Two of them show and hide the stand by switching the dummy's visibility component; the third deletes the dummy and destroys this component, so that one retires the spawner for good rather than merely hiding it. |

### Helper

**BPC_Helper_SpawnedActor**4 members

extends `ActorComponent`

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 Timer`Settings | `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_PickupDummy**12 members

extends `Actor`

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 Mesh`Content | `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 only re-applied to a dummy that has already been grabbed. |
| var | `Actor to Spawn`Content | `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 Timer`Content | `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 Material`Content | `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 Scale`Content | `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 Sound`Content | `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. The relative transform from the mesh definition is only re-applied to a dummy that has already been grabbed, so one still sitting on its spawner stays where it is. |

### Widgets

**AFOverlay_Spawner**18 members

extends `AFSExtendedOverlay` · implements `BPI_WidgetElement`

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 Class`Settings | `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 Representation`Settings | `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 Instance`Settings | `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 Timer`Settings | `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 Widget`Settings\|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 Widget`Settings\|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 | `Active`State | `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 Sound`Settings\|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. |
