Driving Niagara Parameters via Scene Graph Variables
What you'll learn
- How Verse reads and updates Scene Graph variables tied to Niagara emitters.
- Synchronizing visual feedback with gameplay state using player UI APIs.
- Writing performant, suspending loops that drive continuous parameter updates.
How it works
When you place a Niagara System in Scene Graph, you can expose custom variables and bind them directly to emitter parameters (scale, color, spawn rate, etc.). Instead of relying on static editor values, Verse can compute these values on the fly and push them down to the visuals. To ensure players are aware of these dynamic changes, we wire up a feedback loop that broadcasts the current parameter state to every connected player's canvas.
Let's build it
This device simulates the core driver pattern: a continuous coroutine that increments a parameter (representing the Scene Graph variable feeding your Niagara chain) and pushes the live value to player UIs using GetPlayerUI[] and AddWidget.
using { /Verse.org }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Devices }
niagara_scene_driver := class<concrete>(creative_device):
@editable
// Represents the Scene Graph variable driving your Niagara emitter
TargetParam : float = 0.0
Running : logic = true
OnBegin<override>()<suspends>: void =
loop:
if (Running?):
// In a real map, this is where you'd assign to the Scene Graph variable
set TargetParam += 1.5
Print("Driving Niagara parameter to {TargetParam}")
// Push real-time feedback to every player's screen
if (Players := GetPlayspace().GetPlayers()):
for (Player : Players):
if (UI := GetPlayerUI[Player]):
UI.AddWidget(text_block_widget{
Text: "Scene Graph Param: {TargetParam}"
})
// Yield to prevent CPU hugging while updating visuals
Sleep(0.2)
else:
Sleep(0.1)
Try it yourself
- Place a
Niagara System Emitterin Scene Graph. - Open its parameters and create a new
Floatvariable. - Map that variable to an emitter's
ScaleorColorparameter. - Place this device in your level, play, and watch the particles react to the UI feedback loop.
Recap
- Scene Graph variables allow Verse to control Niagara in real-time.
GetPlayerUI[]andAddWidgetlet you push dynamic status updates directly to players.Sleepkeeps your parameter loop performant by yielding between updates.
Check your understanding
Test yourself with an interactive quiz and track your progress + earn XP — free for members.
Turn this into a guided course
Add Driving Niagara Parameters via Scene Graph Variables in Verse to your free study plan — we'll suggest related pages and stitch the lot into one compile-checked, self-guided lesson with worked examples and quizzes.
References
Original tutorial generated by Verse Island from the Verse/UEFN knowledge base, with references to the Epic Games sources above. Code is validated against the knowledge base.