We have the problem that a Niagara Effect gets stuck because a sequence is triggered when the effect is already deactivated but not destroyed.
The sequence jumps to a view target that is far enough away for the effect to be culled.
The camera jumps back to the player at the end of the sequence which disables culling which restarts the effect.
The effect is now stuck.
The effect in our example is triggered from a montage with a timed Niagara effect animation notify state. The effect is started and stopped by the animation notify state.
I could reproduce the same effect by just deactivating a running Niagara effect and triggering re-register by setting view targets. This is shown in the packaged example.
I can solve the problem for our specific case by disabling scalability culling for this particular effect.
I looked a little bit into how to fix the bug in a general matter and atm I was thinking of not re-registering Niagara effects that are set to Inactive either in the “UNiagaraComponent::ResolveOwnerAllowsScalability” or in the “FNiagaraWorldManager::RefreshOwnerAllowsScalability” function.
bool UNiagaraComponent::ResolveOwnerAllowsScalability(bool bRegister)
{
if (bRegister && SystemInstanceController && (SystemInstanceController->GetActualExecutionState() == ENiagaraExecutionState::Inactive))
{
return false;
}
....
}
Did I misunderstood something or is the behavior not what it should be?