0
0
Unityframework~10 mins

Particle System component in Unity - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - Particle System component
Create Particle System
Set Emission Rate
Configure Particle Properties
Play Particle System
Particles Emit & Animate
Particles Die & Loop or Stop
This flow shows how a Particle System is created, configured, played, and how particles emit, animate, and eventually die or loop.
Execution Sample
Unity
var ps = gameObject.AddComponent<ParticleSystem>();
var emission = ps.emission;
emission.rateOverTime = 10f;
ps.Play();
This code adds a Particle System to a game object, sets the emission rate to 10 particles per second, and starts the particle emission.
Execution Table
StepActionParticle System StateEmission RateParticles EmittedNotes
1Add ParticleSystem componentStopped00Particle system created but not playing
2Set emission rate to 10Stopped100Emission rate configured but no particles emitted yet
3Call Play()Playing100Particle system starts emitting particles
4After 0.1 secondsPlaying101Approximately 1 particle emitted (10 per second)
5After 0.5 secondsPlaying105Approximately 5 particles emitted
6After 1 secondPlaying1010Approximately 10 particles emitted
7Stop calledStopped1010Emission stops, existing particles remain until lifetime ends
8Particles die after lifetimeStopped100All particles disappeared, system idle
💡 Particle system stops emitting when stopped and all particles have died.
Variable Tracker
VariableStartAfter Step 2After Step 3After Step 6After Step 8
ParticleSystem StateNoneStoppedPlayingPlayingStopped
Emission Rate010101010
Particles Emitted000100
Key Moments - 3 Insights
Why are no particles emitted immediately after setting the emission rate?
Because the particle system is still stopped (see Step 2 in execution_table). Particles only emit when Play() is called.
What happens to particles after Stop() is called?
Emission stops immediately but existing particles remain until their lifetime ends (see Step 7 and 8).
Does changing emission rate affect already emitted particles?
No, emission rate controls new particles emitted per second, existing particles continue their lifecycle unchanged.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the Particle System State at Step 3?
APaused
BPlaying
CStopped
DDestroyed
💡 Hint
Check the 'Particle System State' column at Step 3 in execution_table.
At which step does the particle system stop emitting new particles?
AStep 7
BStep 6
CStep 4
DStep 8
💡 Hint
Look for the step where the state changes to 'Stopped' but particles still exist.
If emission rate was set to 20 at Step 2, how many particles would be emitted after 0.5 seconds?
A5
B20
C10
D0
💡 Hint
Emission rate is particles per second; multiply by time (0.5s) to estimate emitted particles.
Concept Snapshot
Particle System component in Unity:
- Add component to GameObject
- Set emission rate (particles per second)
- Call Play() to start emitting
- Particles animate and die after lifetime
- Stop() halts emission but particles remain until dead
Full Transcript
This visual execution shows how a Particle System component in Unity works step-by-step. First, the system is added and is stopped with zero emission. Then the emission rate is set but no particles emit until Play() is called. Once playing, particles emit over time based on the emission rate. When Stop() is called, emission stops but existing particles continue until their lifetime ends. Variables like Particle System State, Emission Rate, and Particles Emitted change over time as shown in the tables. Key moments clarify common confusions about when particles emit and what happens after stopping. The quiz tests understanding of these steps.