0
0
Unityframework~30 mins

Particle System component in Unity - Mini Project: Build & Apply

Choose your learning style9 modes available
Create a Simple Particle System in Unity
📖 Scenario: You are making a simple game scene in Unity where you want to add a visual effect of sparks when the player collects a coin.
🎯 Goal: Build a basic particle system in Unity that emits sparks with specific settings to show a nice effect.
📋 What You'll Learn
Create a new GameObject with a Particle System component
Configure the particle system to emit 50 particles per second
Set the particle lifetime to 2 seconds
Set the start color of particles to yellow
Enable emission shape as a cone
Set the cone angle to 25 degrees
💡 Why This Matters
🌍 Real World
Particle systems are used in games and apps to create effects like fire, smoke, sparks, and magic. Learning to configure them helps make scenes more lively and interactive.
💼 Career
Game developers and interactive media creators use particle systems to enhance visual storytelling and user experience.
Progress0 / 4 steps
1
Create a GameObject with Particle System
In the Unity Editor, create a new empty GameObject called SparksEffect and add a ParticleSystem component to it.
Unity
Need a hint?

Use new GameObject("SparksEffect") to create the object and AddComponent<ParticleSystem>() to add the particle system.

2
Set Emission Rate
Create a variable called emission to access the emission module of the particle system, then set its rateOverTime to 50 particles per second.
Unity
Need a hint?

Use ps.emission to get the emission module and set rateOverTime to 50f.

3
Configure Particle Lifetime and Start Color
Set the particle system's main module startLifetime to 2 seconds and startColor to yellow using the main variable.
Unity
Need a hint?

Use ps.main to get the main module and set startLifetime and startColor.

4
Set Emission Shape to Cone with Angle
Access the shape module of the particle system with a variable called shape, set its shapeType to ParticleSystemShapeType.Cone, and set the angle property to 25 degrees.
Unity
Need a hint?

Use ps.shape to get the shape module, then set shapeType and angle.