> ## Documentation Index
> Fetch the complete documentation index at: https://xrlive.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Spawn Visual Actor

> Spawn an actor and automatically register it for cleanup

## Blueprint node

**Category:** `XRLIVE | ACTORS`

A drop-in replacement for **Spawn Actor from Class** that automatically registers the spawned actor for cleanup when the visual closes.

| Pin               | Type                  | Description                                                     |
| ----------------- | --------------------- | --------------------------------------------------------------- |
| `Actor Class`     | `TSubclassOf<AActor>` | The class to spawn                                              |
| `Spawn Transform` | `Transform`           | Location, rotation, and scale                                   |
| Return            | `AActor*`             | The spawned actor (use `DeterminesOutputType` for correct cast) |

## Example

```
Event BeginPlay
    ↓
Spawn Visual Actor
    Actor Class: BP_Column
    Spawn Transform: (Location: 0,0,0)
    ↓
[Use the returned actor reference normally]
```

## Notes

* Use this instead of `Spawn Actor from Class` for any actor that should not persist after the visual closes.
* The spawned actor is destroyed automatically — you do not need to call `Destroy Actor` yourself.
* If the actor is already destroyed before the visual closes (e.g., by gameplay logic), the cleanup system handles the stale reference safely.
