Particle System 2D
Emits visual sprites from a bounded CPU pool. World-space particles stay at their birth location when the emitter moves.
component particles.ParticleSystem2D
Usage
Add it with Create → Effects → Particle System.
Art Studio
Try it
Particle emission rate
A prewarmed emitter with Rate zero has no particles. Its capacity is 20.
Set Rate to 40 to fill the emitter. Reset stops emission and clears the particles.
Scene2 nodes
Fields
| Name | Type | Default | Description |
|---|---|---|---|
| Prewarm | float | 0 | Seconds of bounded preparation for a looping effect, up to two. 0 – 2 |
| Edge A | Vec2 | (0, 0) | First endpoint in emitter coordinates. |
| Edge B | Vec2 | (1, 0) | Second endpoint in emitter coordinates. |
| Mask | Texture | none | Source sprite frame. Its prepared alpha mask is independent of atlas packing. |
| Mask Threshold | float | 0.5 | Minimum source alpha used by the sprite mask, from zero to one. 0 – 1 |
| Frames | []assetRef | [] | Ordered sprite frame references for a flipbook. Missing frames are diagnosed. |
| Frame FPS | float | 12 | Flipbook playback speed in frames per second. ≥ 0 |
| Frame Loop | bool | true | Repeat the flipbook; otherwise hold its last frame. |
| Sort Mode | enum | age | Oldest first, youngest first or farthest first for each camera. one of: age, youngestFirst, distance |
| Reduced Motion | enum | keep | Keep, reduce or hide this effect when Reduce Motion is enabled. one of: keep, reduce, hide |
| Reduced Rate | float | 0.3 | Fraction of births kept under the Reduce policy. 0 – 1 |
| Drag | float | 0 | Nonnegative damping coefficient per second. ≥ 0 |
| Noise Strength | float | 0 | Magnitude of deterministic presentation noise. ≥ 0 |
| Noise Frequency | float | 1 | How fast the noise field changes. ≥ 0 |
| Kill Y Enabled | bool | false | Remove particles on the side of increasing Y past Kill Y. |
| Kill Y | float | 0 | Threshold in simulation space, in world units. |
| Plane Enabled | bool | false | Remove particles past the configured clipping plane. |
| Plane Normal | Vec2 | (0, 1) | Outward normal of the clipping plane in simulation space. |
| Plane Distance | float | 0 | Plane offset along its normalized normal. |
| Color Over Life | []particles.ColorKey | [] | Ordered keys for the straight color multiplier at normalized ages. |
| Velocity Over Life | Curve | curve | Speed multiplier by normalized age, applied without compounding. read-only in scripts |
| Play On Start | bool | true | Starts the emission schedule when this emitter becomes active. |
| Loop | bool | true | Repeats the schedule at the end of each cycle. |
| Duration | float | 1 | Length of one emission cycle in seconds. ≥ 0 |
| Time Domain | enum | game | Game pauses with the world; unscaled uses real presentation time. one of: game, unscaled |
| Seed | int | 0 | Nonzero locks the seed. Zero derives it from the session, stable node ID and activation. |
| Max Particles | int | 64 | Maximum live particles. When full, keep living particles and drop excess births. 1 – 65536 |
| Rate | float | 8 | Continuous births per second. Zero allows manual bursts without a continuous stream. ≥ 0 |
| Bursts | []Vec2 | [] | Cycle keys as (time in seconds, birth count). Times must be in [0, duration). ≥ 0 read-only in scripts |
| Shape | enum | point | Birth positions come from a point, disk, rectangle, line segment or sprite alpha mask. one of: point, circle, rect, edge, spriteMask |
| Offset | Vec2 | (0, 0) | Local offset of the emitter shape. |
| Rect Size | Vec2 | (1, 1) | Full rectangle dimensions in world units. ≥ 0 |
| Radius | float | 0.5 | Circle radius in world units. ≥ 0 |
| Lifetime | Vec2 | (0.4, 0.7) | Minimum and maximum particle lifetime in seconds. ≥ 0 |
| Speed | Vec2 | (0.5, 1.5) | Minimum and maximum initial speed in units per second. ≥ 0 |
| Size | Vec2 | (0.08, 0.16) | Minimum and maximum starting side length in world units. ≥ 0 |
| Rotation | Vec2 | (0, 0) | Minimum and maximum initial rotation in radians. |
| Direction | float | -1.5708 | Central angle of launch in radians. |
| Spread | float | 1.5708 | Full angular width around direction, in radians. 0 – 6.28319 |
| Color | Color | rgba(1, 1, 1, 1) | Straight linear tint and opacity at birth. |
| Gravity | Vec2 | (0, 0) | Acceleration in units per second squared. |
| Size Over Life | Curve | curve | Size multiplier sampled at normalized particle age. read-only in scripts |
| Alpha Over Life | Curve | curve | Opacity multiplier sampled at normalized particle age. read-only in scripts |
| Rotation Speed | float | 0 | Angular speed in radians per second. |
| Space | enum | local | Local particles follow the emitter; world particles keep their birth transform. one of: local, world |
| Sprite | Texture | none | Texture region to draw. Empty uses the built-in white texture. |
| Material | AssetRef<material> | none | Optional unlit sprite-domain material. Its shader controls the blend mode. |
| Layer | int | 0 | Painter layer shared with SpriteRenderer and Mesh2D. |
| Order | int | 0 | Painter order within the layer. |
Methods
Burst method
func (ParticleSystem2D) Burst(count int)
Requests count births at the emitter. Does not start automatic emission.
Example
Dust.Get<ParticleSystem2D>().Burst(8)
Clear method
func (ParticleSystem2D) Clear()
Removes live particles without changing the emission schedule.
Count method
func (ParticleSystem2D) Count() int
Returns the current number of living particles on the emitter.
Emitting method
func (ParticleSystem2D) Emitting() bool
Reports whether automatic emission is running.
Play method
func (ParticleSystem2D) Play()
Starts automatic emission. Repeating Play while emitting does nothing.
Playing method
func (ParticleSystem2D) Playing() bool
Reports whether the schedule is running or particles remain.
Restart method
func (ParticleSystem2D) Restart()
Clears live particles and starts a new emission schedule.
Stop method
func (ParticleSystem2D) Stop()
Stops new emissions and lets live particles drain.
StopAndClear method
func (ParticleSystem2D) StopAndClear()
Stops automatic emission and immediately removes living particles.
Signals
Completed signal
signal Completed()
A finite emission schedule has ended and its last particle expired. A presentation signal, not a gameplay timer.
Related guides
- CPU particle effects In the Create palette, choose Effects → Dust for a manual burst, or Smoke for continuous emission.