Unreal Niagara Arrays (set/add data via For-Loop)

I provided some infos already here but I think this topic is too important (and niagara arrays too annoying) to burry it into a different thread.

TL;DR

You think by adding an attribute like Particles.Array[], each particle gets its own unique array? Wrong!

  • Arrays are shared data!

    • Emitter.Array[] is shared per Emitter
    • Particles.Array[] is shared per System (!)
  • Arrays need to be set (not enough to just defined them in Parameters > Emitter Attributes.

  • Adding/Setting Array Data via For-Loop in a Scratch Pad only works:

    • :white_check_mark: for GPU Emitters
    • :white_check_mark: In Particle Update & Max Elements > 0: Loop is executed x times per particle & per tick (!)
  • Fail Behavior when Adding/Setting Data via For-Loop in

    • :x: Emitter Spawn: Loop is executed only once
    • :x: Emitter Update: Loop is executed only once per tick
    • :x: Particle Spawn & Max Elements > 0: Loop is executed only once per particle (!)
    • :x: Particle Spawn & Max Elements == 0: Loop is not executed
    • :x: Particle Update & Max Elements == 0: Loop is not executed

AI “Proof”

I’ve uploaded these files from the Unreal Engine Source Code to Google AI und asked Do particles get their own unique array ?

No, individual particles do not get their own unique arrays.
Instead, there is one single array per Niagara System Instance (or Emitter Instance). All particles within that context share and point to this exact same array.

NiagaraDataInterfaceArrayNiagaraID.h
NiagaraDataInterfaceArrayFunctionLibrary.h
NiagaraDataInterfaceArrayImpl.h
NiagaraDataInterfaceArray.h

How to Debug Niagara Arrays ?

There are two functions for getting data into your array.

  1. Open Attribute Spread Sheet
  2. Click Capture, Select your Array
    UnrealEditor_2026-11-09_12-58-17

How to Add/Set Data via Scratch Pad

There are two functions to get data into your array:

Live Examples

Setup # 1

  • GPU Emitter, spawning 3 Particles
  • 3 Array Elements manually added [0.0 ,0.0, 0.0] as test
  • Max Elements: 0
  • Fill My Array writes to Emitter.MyArray[] in Emitter Update using Add()

Result

:x: Only 1 array element is added per tick (instead of 10, like the for-loop demands)

UnrealEditor_2026-11-09_14-53-43

:x: Even with max elements at 100 it does not change anything.

Setup # 2

  • GPU Emitter, spawning 3 Particles
  • 3 Array Elements manually added [0.0 ,0.0, 0.0] as test
  • Max Elements: 0
  • Fill My Array writes to Particles.MyArray[] in Particle Spawn using Add()

Result

:x: Nothing is added to the array

:white_check_mark: Setting Max Elements to 100 makes it work. Now we get 10 data entries per particle.

7 Likes