> ## 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.

# Actor Management

> Automatically clean up runtime-spawned actors, effects, and MPC changes when your visual closes

When the xRLive Launcher switches visuals, it automatically cleans up anything registered with the SDK during the visual's lifetime. This prevents content from one visual bleeding into another.

## The problem

Actors spawned at runtime via the standard **Spawn Actor from Class** node are not tied to the visual's pak or map — they live in the persistent world and survive visual switches.

The same applies to:

* **Looping Niagara effects** spawned via `Spawn System at Location`
* **Material Parameter Collection values** changed by your visual's Blueprint

## The solution

Use the SDK's registration nodes so the launcher knows what to clean up.

| Node                     | What it handles                        |
| ------------------------ | -------------------------------------- |
| `Spawn Visual Actor`     | Spawns an actor and auto-registers it  |
| `Register Visual Actor`  | Registers an actor you already spawned |
| `Register Visual Effect` | Registers a Niagara component          |
| `Register MPC for Reset` | Marks an MPC to be reset to defaults   |

All registered items are destroyed/reset automatically in `EndPlay` when the visual closes — no extra work needed.
