How to get the value LoopBehavior of Niagara SystemState?

Hi Estelle,

First sorry for the late response, it looks similar to what I have done in some local code…

`const FName NAME_LoopBehavior(“Loop Behavior”);

TArray<UNiagaraNodeStaticSwitch*> StaticSwitches;
UNiagaraGraph* NiagaraGraph = SystemStateFunctionCall->GetCalledGraph();
NiagaraGraph->GetNodesOfClass(StaticSwitches);

auto FindStaticSwitch =
[&StaticSwitches](FName SwitchName) → UNiagaraNodeStaticSwitch*
{
for (UNiagaraNodeStaticSwitch* Switch : StaticSwitches )
{
if (Switch->InputParameterName == SwitchName)
{
return Switch;
}
}
return nullptr;
};

WeakLoopBehaviorSwitch = FindStaticSwitch(NAME_LoopBehavior);`This is something I haven’t checked, but I’m parsing the system state locally so for stateless emitters I can auto disable the script if it’s trivial to parse. Once you start to add dynamic inputs then it’s no longer possible, but for static values you should be fine.

Thanks,

Stu