I’m running into a strange problem where emitter array variable references don’t seem to get initialized properly for duplicated emitters in a system until I disable and re-enable the emitter. No amount of hitting compile and/or save changes things. The only fix seems to be to disable and the re-enable the duplicated emitter in the system.
The issue occurs for both CPU and GPU emitters.
UE5 5.0.3
Repro:
- Create new empty emitter
- Add new emitter attribute array: Make New → Data Interface → Float Array
- Drag your new array variable into the Emitter Spawn section to initialize it and add a single value (let’s use 100)
- Add Spawn Rate module to Emitter Update section, set to 1.0 (or whatever you like)
- In the Initialize Particle module, set Sprite Size Mode to Uniform
- For the value of Uniform Sprite Size, choose Dynamic Input → Select float from Array
- Drag your array variable from the Emitter Attributes into the Float Selection Array of Uniform Sprite Size
We now have a working emitter:
- save your emitter, right-click on it in the Content Browser and choose Create Niagara System
- in the System, right-click on your emitter and hit ctrl+c, ctrl+v to copy paste.
- Disable the original emitter
- Observe: particles exist but have 0 size
- Disable and then re-enable the 2nd emitter
- Observe: particles have correct size
EDIT: the issue goes away in 5.1.0 after clicking ‘save’, so the main problem seems to be in 5.0.3 only.