CVar fx.Niagara.WorldManager.UseTickPasses breaks Niagara parameters for restarted systems

We found that setting fx.Niagara.WorldManager.UseTickPasses=1 will break the parameters for restarted Niagara systems.

A fix would be appreciated so we can use this CVar value as a CPU optimization.

Thank you,

Eric

[Attachment Removed]

Steps to Reproduce

  1. Setup a Niagara system that binds to Blueprint values for something (IE: the color of the effect)
  2. Setup a test BP with a Niagara Component that uses the system, and auto activates, and has command line hooks to allow activating and deactivating the system
  3. During BeginPlay, set the Object parameter to the parent BP for the VFX component
  4. Notice the effect spawns with the default color when in editor viewing
  5. When running PIE or SIE, it will bind and use the overridden BP color
  6. Now deactivate the system and wait for it to finish
  7. Now activate the system and notice it lost the binding and has reverted to the default color
    [Attachment Removed]

Hi Eric,

We already have a Jira in for this, but it’s not been high on our priority list to fix as the perf gains we saw internally for FN weren’t really significant enough.

I don’t really have an ETA for when it might be fixed tbh.

Thanks,

Stu

[Attachment Removed]

Well I said no ETA, but I thought your repro was easy enough to have a look over it (the previous report I had inside FN wasn’t clear how to repro).

I’ve made the following change locally and that seems to have fixed it

	// When tick passes are enabled we need to quick release the simulation otherwise they can linger causing more tick groups to be active
	FNiagaraWorldManager* WorldManager = GetWorldManager();
	if (WorldManager && WorldManager->UseTickPasses())
	{
		SystemSimulation = nullptr;
 
		// We need to do a full parameter unbind rather than a partial unbind as we have (intentionally) lost connecting to the simulation
		UnbindParameters(false);
	}
	// If not using tick passes and not pooled so a partial parameter unbind
	else if (!bPooled)
	{
		UnbindParameters(true);
	}

I’ll kick off some EngineTests, and if they pass I’ll submit the change.

Thanks,

Stu

[Attachment Removed]

I’ve submitted the change in 53423787.

I have not enabled this yet, as I need to do some more verification, but I think we should be good.

Thanks,

Stu

[Attachment Removed]

Hi Stuart,

We cherry picked 53423787 and it fixed our issue.

Thanks!

[Attachment Removed]

Awesome, appreciate you letting me know :slight_smile:

[Attachment Removed]