Unreal Niagara For Loop Example

Some more knowledge about iterating over array:

:white_check_mark: Works:

  • GPU Particle System
  • Iterate over Array in Particle Update
  • :warning: At least 1 particle must exist, otherwise the Particle Update isn’t executed (makes sense)
  • :information_source: For better testing, each debug sphere uses a slightly bigger radius with each iteration

:x: Does not work: CPU

  • CPU Particle System → For Loop iterates only once

UnrealEditor_G9o0w1Hm1h

:x: Does not work: Emitter Update

  • Executing the loop in Emitter Update → --> For Loop iterates only once
  • :information_source: The problem is NOT the array data (see below)

UnrealEditor_uxURTMJAlp

The array data is correct. It’s really the iteration which doesn’t work when executing the For Loop in Emitter Update! Proof: When I access the array randomly, I get the correct positions:

UnrealEditor_Gnsegs8sve

2 Likes