5.6.1 Niagara Fluid Gas Template triggers permanent “dirty/unsaved” compile warning

Summary

Any Niagara Fluid Gas template using Grid3D_Gas_Master_Emitter produces an engine-generated HLSL warning on the Particle GPU Compute Script. Because the warning re-appears on every compile, the System immediately becomes marked as unsaved (dirty) even after saving. Warning originates from /Engine/Generated/NiagaraEmitterInstance.ush and cannot be fixed at the content level.

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Assets

Steps to Reproduce

Create a new Niagara System.

In Templates, choose any Niagara Fluids Gas template (e.g. Grid 3D Gas, Explosion, Fire, Smoke, etc.).

Open the system and click Full Rebuild (3-dot menu near Compile).

Observe compile warnings.

Save the asset and close the window.

Re-open the system editor → the asset is flagged as dirty again.

Expected Result

Template assets should compile cleanly by default.

Saving should clear the dirty flag.

Observed Result

System successfully saves, but always remains flagged “dirty/unsaved”.

The same warning appears every time the GPU script recompiles.

Platform(s)

Unreal Engine 5.6.1

Video

Additional Notes

Compile Warning Output:

/Engine/Generated/NiagaraEmitterInstance.ush:4953:15: warning: redefinition of ‘i’
shadows declaration in the outer scope; most recent declaration will be used [-Wfor-redefinition]
for (int i = 0; i <= In_Radius; ++i) ^
Grid3D_Gas_Master_Emitter, Particle GPU Compute Script,
/Engine/Generated/NiagaraEmitterInstance.ush:4941:15: note: previous definition is here
for (int i = 0; i <= In_Radius; ++i) ^
System successfully compiled with 2 warnings.

Actually, this is onlythe 5.6.1 bug and does not happen in 5.7.0 however if there is any fix a user can implement on 5.6.1 please let me know. The current show on my project uses 5.6.1 so…

1 Like

I check the templete and Source Code, and finally figure out why this happened.
Core problem is the “static bool paramter” inside volume renderer
When this parameter has been used, it triggers EditchangeMIC.
So the solution is
On this file
Engine/Plugins/FX/Niagara/Source/Niagara/Private/NiagaraRendererProperties.cpp
check out this function
UNiagaraRendererProperties::UpdateMaterialParametersMIC
delete //MIC->PreEditChange(nullptr);

That’s it.Good luck