Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


spawnCount

The current Spawn count.
Read time 1 minuteLast updated 7 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine.VFX
  • Assembly: UnityEngine.VFXModule
public float spawnCount { get; set; }

Remarks

The Spawn count is relative to a unique frame. If this custom block is the first one in the stack, the Spawn count is 0.0f.
The Spawn system accumulates the Spawn count. Remaining integer values are consumed by a particles system.
For example, the internal constant Spawn rate is implemented this way:

Examples

state.spawnCount += currentRate * state.deltaTime