Hi everybody,
I have an Actor that spawn multiple niagara system and attached them to its RootComponent.
The actor should destroy itself when all the spawned niagara system are finished. To do so, it binds the “OnSystemFinished” event each time a new one is spawn. See the code below:
UNiagaraComponent* NewNiagara = UNiagaraFunctionLibrary::SpawnSystemAttached(SystemTemplate, AttachToComponent,
AttachPointName, Location, Rotation, LocationType, bAutoDestroy, bAutoActivate, PoolingMethod, bPreCullCheck);
if (NewNiagara) {
this->Arr_Niagaras.Add(NewNiagara);
FScriptDelegate Delegate;
Delegate.BindUFunction(this, TEXT("OnNiagaraFinished"));
NewNiagara->OnSystemFinished.AddUnique(Delegate);
}
For an obscure reason the event OnSyStemFinished never fire. Is there any configuration to activate in the Niagara editor for this event to be properly fired ?
Many thanks!