Lifecycle overview
What is cleaned up automatically
When a visual closes, the SDK cleans up everything registered during the visual’s lifetime:
What you must manage yourself
Anything spawned or modified at runtime that is not registered with the SDK will persist into the next visual.
If you use the standard Spawn Actor from Class node instead of Spawn Visual Actor, the spawned actor will not be cleaned up automatically. You have two options:
- Replace it with
Spawn Visual Actor — same inputs, auto-cleanup.
- Register it manually by calling
Register Visual Actor right after spawning.
The same applies to Niagara effects and MPC changes — always register them at the start of your visual’s lifecycle (e.g., in Event BeginPlay).
Best practices
- Use
Spawn Visual Actor for any actor you create at runtime.
- Call
Register Visual Effect on any looping Niagara system right after spawning it.
- Call
Register MPC for Reset once on Event BeginPlay for every MPC your visual writes to.
- Do not use
Add to Viewport for custom widgets — add them as children inside xRLive_Viewport’s named slots so they are removed automatically.