How to and WHY you would gather all of your Unreal Engine 5 particle needs (spawn locations) into a single array of transforms per emitter type, in order to spawn each particle using only a SINGLE GLOBAL emitter per type.
WHY: Draw Calls, 10,000 draw calls in this example vs 30-40 when using a single emitter. I initially thought that timing, management of destroying niagara components would be the big savings... but no, it was draw calls!
Tutorial Broad Steps
1. Generate Your Data (Vector3 arrays of Positions/scale/rotation data)
2. Send that Data to Niagara via "Set Niagara Vector Array" BP nodes
3. Create Custom User Input Data Variables (vector3 arrays) in Niagara named the same as you "set" the data to in #2
4. Create Custom INPUT Niagara Variables via ScratchPad that you can GetMap on for two custom scratchpad nodes:
4a1. Create Custom Scratch Pad "Spawn Particles off Array Length" and set niagara variable array reference just to gain a count total passed in
4a2. Send that Length to a "Make Spawn Info" node to spawn particles.
4b1. Create Custom Scratch Pad on Particle Spawn to "position particle off input" with two Input vector arrays for position and scale.
4b2. Remove Last from Input Arrays to Position and eat locations for each particle out of the array.
5. Destroy excess GPU particles
GAMEDEV Indiegamedev Blueprints C++ VFX Madewithunreal Videogames Tutorials code review example templates