Niagara system not working until I open it and it compiles - still won't work in packaged game

Ok, I progressed and fixed my FX.
On my side, it happened only with array properties on GPU emitters.

At the start, I used the User Exposed properties to set Emitter Attributes in the Emitter Update Tab.

User Exposed properties and Emitter Attributes used the same names.

  • I added a “U_” prefix to all User Exposed parameters so they don’t use the same names.
  • And I added an Effect Type in the System Property: Frequency: Medium, Cull Reaction: Pause.

This fixed the bug in the editor; when I reload the asset or restart the editor, it works without me having to open it. But not in the packaged game…

  • So, in the end, I removed the Emitter Attributes and used module inputs to directly pass the User Exposed properties.

I’m not sure what caused this bug exactly, but now it works for me after reload, restart, and in the packaged game.

In our case we fixed it moving the logic to use Niagara Data Channels.
It is not a fix directly but works :slight_smile:

This worked for me. I was also using collision on the particles. Thanks

So any comments from Epic Games ? This system does not work in 5.5.1. Will it be fixed at all ?

Most of the time when a Niagara system doesn’t work until you open it in the editor, it is caused by unintentional attribute trimming. There can be other reasons why it won’t work correctly in a packaged game (plugin load order, uncooked dependencies, etc), but if you put it in a level and restart the editor and it won’t play until you open the asset itself then you should try to disable these settings in your system properties:

  • trim attributes
  • bake rapid iteration parameters

If that fixes it, you can either leave them off (only downside a a bit of a performance and memory hit), or you can try and hunt down the missing attribute and add it to the explicit include list. The attribute trimmer cuts out everything not directly referenced by a renderer, but sometimes when using things like particle attribute readers, things can slip through the cracks.

The reason why it works when you open the asset is because as longs as it’s open, it will be compiled in “editor mode”, which skips things like attribute trimming by default to allow faster iteration.