Quick answer: For one-shot bursts, use Single Burst block (spawn N at once, then done). Constant Spawn Rate continuously evaluates inputs and may go to zero if a property dips. Cache rate or use Single Burst.
VFX system spawns sparks correctly when player presses a button, then stops mid-burst because Speed went to 0 in the spawn rate expression.
The Symptom
Burst spawn produces fewer particles than expected, or stops abruptly. Re-triggering doesn’t restore expected count.
The Fix
Single Burst for one-shot.
Spawn Context:
+ Single Burst
Count: 50
Delay: 0
Single Burst fires count then stops. Doesn’t depend on continuous rate evaluation.
Continuous with cached rate.
Spawn Context:
+ Constant Spawn Rate
Rate: Property "_SpawnRate" (cached, not derived from Speed)
Set _SpawnRate from script with a stable value:
vfx.SetFloat("_SpawnRate", Mathf.Max(10f, currentRate));
Verifying
Trigger the effect. Count particles in the Niagara/VFX overlay. Single Burst always emits count; Constant runs at the rate as expected.
“Single Burst for explosions. Cached rate for continuous. No mid-burst dropout.”
Related Issues
For VFX Graph events, see events. For VFX Graph attribute mapping, see attribute mapping.
Single Burst owns count. Cached rate stays steady.