Unity Particle System Component: from the basics to enough to use
Minh Khoa
Author
For people new to Unity VFX. Written in an easy-to-read blog style, but still covering almost all of the important parts of the
Particle Systemcomponent.
The current project uses Unity 6000.3.13f1. The content below is based on the modern Unity Particle System in Unity 6; a few field names may differ slightly if you open the project with an older Unity version.
## 1. What is a Particle System?
Particle System is a component used to create very many small “particles” called particle.
Each particle is usually just:
- A small image facing the camera, for example smoke, dust, light, sparks.
- Or a small mesh, for example rock fragments, leaves, debris.
A single particle looks very simple. But when Unity creates many particles, moves them, changes their color, fades them out, rotates them, makes them expand, collide… the human eye sees a large effect such as:
- Cooking smoke.
- Fire.
- Dust when a character runs.
- Coins flying out.
- Twinkling stars.
- Hit effects when slashing a monster.
- Bubbles, snow, rain, fireworks.
Imagine Particle System like a confetti machine. You do not control each piece of paper by hand. You adjust the machine: how much it sprays, where it sprays from, how fast it flies, what color it is, how long it lives, and what happens when it dies.
2. Built-in Particle System or Visual Effect Graph?
Unity has 2 main approaches for making particles:
| System | When should you use |
|---|---|
Built-in Particle System | Medium and small effects, easy to tweak in the Inspector, need scripts to read/write each particle, suitable for mobile and everyday VFX gameplay. |
Visual Effect Graph | Very large effects, hundreds of thousands or millions of particles, run GPU, suitable PC/console/URP/HDRP depending on configuration. |
For games like idle/mobile such as Sushi Bar Idle, most gameplay effects should start with Built-in Particle System: lightweight, familiar, easy to prefab, easy to pool.
3. Mental model: How does Particle System run?
A particle usually goes through this lifecycle:
Emitter sinh particle
↓
Particle nhận giá trị ban đầu
↓
Particle sống trong vài giây
↓
Các module thay đổi nó theo thời gian
↓
Renderer vẽ particle ra màn hình
↓
Particle hết lifetime và biến mất
Example with smoke:
Emissionspawn 20 particles/second.Shapeset the particles to spawn from a small circle.Mainset lifetime to 2 seconds, slow speed, gray color.Size over Lifetimemake the particles grow larger over time.Color over Lifetimemake the particles fade out over time.Noisemake the particles drift naturally.Rendererrender with a smoke material.
4. How to create a Particle System in Unity
There are 2 common ways:
- Create new:
GameObject > Effects > Particle System. - Add to an existing object: select the object,
Add Component > Effects > Particle System.
When selecting an object with Particle System, in Scene View Unity there is a small preview panel:
- Play / Pause / Stop to preview.
- Playback Speed to fast-forward nhanh/chslowly.
- Playback Time to drag the simulation time.
- Particle Count to see how many particles are currently alive.
This is where you tune the effect like tuning a musical instrument: adjust the numbers, look at the result, adjust again.
5. Reading the Particle System Inspector
Particle System in the Inspector is divided into many blocks called module.
Each module is responsible for a group of behaviors:
Main: overall configuration and initial values.Emission: how many particles to spawn, when to spawn.Shape: what shape to spawn from, initial flight direction.Color over Lifetime: change color over the lifetime.Size over Lifetime: change size over the lifetime.Renderer: render particles to the screen with material/mesh/billboard.
Some modules have an enable/disable checkbox. If a module is disabled, that part does not affect the particles. For example, turning off Size over Lifetime means particles will not automatically shrink to/thu over lifetime anymore.
6. Important value input types
Many fields in Particle System do not accept only a fixed number. Unity gives you several input types:
| Type | Easy-to-understand meaning |
|---|---|
Constant | A fixed value. For example, speed is always 5. |
Curve | A value that changes over time. For example, small at the beginning, large in the middle, small at the end. |
Random Between Two Constants | Each particle randomly picks a number between two values. For example, size from 0.8 to 1.2. |
Random Between Two Curves | Each particle randomly picks between two curves. Use this when you want a more natural effect. |
Color | A fixed color. |
Gradient | Color changes over time. For example yellow → orange → transparent. |
Random Between Two Colors | Each particle chooses a random color between two colors. |
Random Between Two Gradients | Each particle uses a random variation between two gradients. |
A very useful rule:
Over Lifetimemeaning it changes according to the particle's age percentage.By Speedmeaning it changes according to the particle's speed.Rate over Timemeaning it spawns over time.Rate over Distancemeaning it spawns according to how far the object has moved.
7. Main module: the heart of the system
Main is the module that is always present. It determines the initial state and the overall behavior of the Particle System.
| Property | Effect |
|---|---|
Duration | The duration of one system run cycle. If Looping enabled, when the duration ends it repeats. |
Looping | Makes the system run forever in a loop. Used for smoke, fire, flowing water, aura. |
Prewarm | If enabled together with Looping, the effect appears as if it had already run through one cycle. Very useful for fire/smoke that should not start from an empty state. |
Start Delay | Wait for a period of time before starting to emit particles. |
Start Lifetime | How long a particle lives. Short lifetime creates a nhanh/gsharp effect; long lifetime creates a trailing streak or lingering smoke. |
Start Speed | The particle's initial speed. |
3D Start Size | Allows separate size adjustment on each axis X/Y/Z. If disabled, a single size is used. |
Start Size | The initial size. |
3D Start Rotation | Allows separate rotation adjustment on each axis. Often used when rendering mesh particles. |
Start Rotation | The initial rotation angle. Used to randomize textures so they do not look fake due to repetition. |
Flip Rotation | Makes some particles rotate in the opposite direction, helping movement feel more natural. |
Start Color | The initial color. Can use gradient/random color. |
Gravity Modifier | The degree of gravity influence. 0 means no falling; 1 uses the default Physics gravity; negative values make it rise. |
Simulation Space | Simulation space: Local, Worldor Custom. |
Simulation Speed | The speed of the entire system. 0.5 half speed, 2 double speed. |
Delta Time | Use time Scaled or Unscaled. Unscaled suitable for effects UI when the game is paused. |
Scaling Mode | How Transform scale affects particles: by hierarchy, local, or shape only. |
Play On Awake | As soon as the object is active, the particle runs automatically. If turned off, you must call Play() with a script or manually via trigger. |
Emitter Velocity | How Unity calculates the emitter's velocity, used for Inherit Velocity and Rate over Distance. |
Max Particles | The maximum number of particles that can live at the same time. This is a “fuse” to prevent the effect from exploding. |
Auto Random Seed | If enabled, each run looks a little different; if disabled, the effect repeats exactly the same according to Random Seed. |
Random Seed | A fixed random seed when disabled Auto Random Seed. Use when you want a deterministic effect. |
Stop Action | When all particles die, what to do: None, Disable, Destroyor invoke a callback. |
Culling Mode | When off-screen can simulation continue? Extremely important for performance. |
Ring Buffer Mode | Instead of dying when lifetime ends, old particles can wait to be reused when reaching Max Particles. |
Local or World Simulation Space?
| Mode | Simply put | Use when |
|---|---|---|
Local | Particles follow the parent object. | Aura attached to a character, flame attached to a torch. |
World | Once spawned, particles stay in the world even if the emitter moves. | Smoke from a moving car, footsteps dust, movement trails. |
Custom | The particle simulates relative to another Transform. | The effect needs to follow a separate reference. |
Memory tip: if the character runs and the smoke must be left behind, use WorldIf the aura must stick to the character, use Local.
8. Emission module: how many particles to spawn?
Emission determines the particle spawn rate and timing.
| Property | Effect |
|---|---|
Rate over Time | Spawns particles over time. For example 10 means about 10 particles per second. |
Rate over Distance | Spawns particles over the distance the emitter moves. Very useful for footsteps dust, tire tracks, trails when the object moves. |
Bursts | Spawns a burst of particles at a specific time. Used for explosions, pops, coin bursts, hit impacts. |
Burst Time | The burst timing counted from when the system starts running. |
Burst Count | The number of particles in the burst. |
Burst Cycles | How many times the burst repeats. |
Burst Interval | The time interval between burst cycles. |
Burst Probability | The probability that the burst occurs. 1 is guaranteed, 0.5 is 50%. |
For example:
- Continuous smoke:
Rate over Time = 15; no burst needed. - Small explosion:
Rate over Time = 0,Burst Count = 30. - Foot dust:
Rate over Time = 0,Rate over Distance = 4.
9. Shape module: where do particles spawn from?
Shape determines the particle spawn area and the initial velocity direction.
Common shapes
| Shape | In simple terms | Used when |
|---|---|---|
Sphere | Spawn inside or on a sphere. | Aura, round explosion, magic orb. |
Hemisphere | Hemisphere. | Dust rising from the ground, one-sided splash. |
Cone | Spawn from a cone. | Jet flame, water nozzle, confetti spraying out. |
Donut | Torus shape. | Magic ring, ring aura. |
Box | Rectangular box. | Rain, snow, wide dust area. |
Mesh | Spawn from a selected mesh. | Effect on the model surface. |
Mesh Renderer | Take the mesh from an object that has Mesh Renderer. | Particles sticking to the rendered model. |
Skinned Mesh Renderer | Spawn from a mesh with skeletal animation. | Spark/blood/aura on an animated character. |
Sprite | Spawn from a sprite. | VFX 2D following the sprite shape. |
Sprite Renderer | Take the sprite from an object that has Sprite Renderer. | VFX sticking to a sprite in the scene. |
Circle | Flat circle shape. | Ring, ripple, 2D shockwave. |
Edge | A line segment. | Rain from the screen edge, line emitter. |
Rectangle | Flat rectangle shape. | Snow/rain over a plane area. |
Common shape properties
| Property | Effect |
|---|---|
Radius | Radius of the sphere/circle/cone/donut. |
Radius Thickness | 0 spawn on the surface, 1 spawn throughout the entire volume. |
Arc | Use only part of the circle. For example 180° is a half ring. |
Mode | How Unity distributes spawn positions: random, loop, ping-pongburst spread. |
Spread | Divide spawn positions into discrete intervals so particles are more even or rhythmic. |
Speed | The speed at which spawn points move around the arc when using mode loop/ping-pong. |
Angle | The cone opening angle. A larger angle sprays wider, a smaller angle focuses the spray. |
Length | The cone length when spawning in volume. |
Emit From | Spawn from base, volume, edge, shell… depending on the shape. |
Texture | Use a texture to tint or exclude spawn positions. |
Position | Offset the spawn area relative to the Particle System Transform. |
Rotation | Rotate the spawn area. |
Scale | Scale the spawn area. |
Align to Direction | Rotate particles along their initial flight direction. Used for debris, streaks, leaves. |
Randomize Direction | Blend the flight direction with a random direction. Increase it to make particles spread more naturally. |
Spherize Direction | Make the flight direction spread out from the center like a sphere. |
Randomize Position | Add random spawn positions, avoiding a too-even/unnatural look. |
Tip: when the effect looks “mechanical”, try a little randomization Start Size, Start Rotation, Start Lifetime, Randomize Position, or Randomize Direction.
10. Velocity over Lifetime: change velocity over time
This module adds or adjusts velocity while the particle is alive.
| Property | Effect |
|---|---|
Linear X/Y/Z | Add linear velocity along each axis. For example, positive Y makes particles rise. |
Space | Velocity along Local or World. |
Orbital X/Y/Z | Make particles rotate around an axis, like a swirl/ring. |
Offset X/Y/Z | Shift the orbit center when using orbital. |
Radial | Push particles away or pull them closer to the center. |
Speed Modifier | Multiply the current speed over time. |
For example:
- Rising smoke:
Linear Yslightly positive. - Magic swirl: add
Orbital Y. - Explosion dispersing:
Radialpositive. - Implosion inward:
Radialdownward.
11. Noise: add natural motion
Noise add noise/turbulence to particles. If Velocity it is a deliberate path, Noise it is wind, shaking, chaos, “life is not like a spline.”
| Property | Effect |
|---|---|
Separate Axes | Adjust noise separately for each axis. |
Strength | The strength of the noise. Higher means particles deviate xa/mmore strongly. |
Frequency | The frequency of direction changes. Low is smooth; high is jittery nhanh/g. |
Scroll Speed | Make the noise field drift over time, creating a more lively feel. |
Damping | Keep the noise more stable when changing frequency/strength. |
Octaves | The number of noise layers stacked on top of each other. More layers look better but cost more. |
Octave Multiplier | How much the later noise layer weakens. |
Octave Scale | How different the frequency of the later noise layer is. |
Quality | Noise quality. Lower is lighter; higher looks better but costs more. |
Remap | Remap the noise value to a different range. |
Remap Curve | A curve to transform the noise output. |
Position Amount | How much the noise affects position. |
Rotation Amount | How much the noise affects rotation. |
Size Amount | How much the noise affects size. |
Mobile tip: only enable noise when truly needed. Octaves High can be expensive.
12. Limit Velocity over Lifetime: limit speed
This module is like a “brake” or “friction.”
| Property | Effect |
|---|---|
Separate Axes | Limit velocity separately X/Y/Z. |
Speed | Maximum speed. Particles that exceed it will be reduced. |
Space | Limit by local/world when separating axes. |
Dampen | The amount of deceleration when exceeding the limit. |
Drag | Linear drag, causing particles to slow down over time. |
Multiply by Size | Large particles are affected by more drag. |
Multiply by Velocity | Fast particles are affected by more drag. |
Use for:
- Dust or smoke that initially bursts forward then slows down.
- Debris that does not fly forever.
- Magic particles that should drift more and more slowly.
13. Inherit Velocity: inherit velocity
This module is often used for Sub Emitters. It lets child particles inherit velocity from the parent particle or parent emitter.
| Property | Effect |
|---|---|
Mode: Current | Each frame, particles continue to receive the current velocity of emitter/parent. If the parent slows down, the particles slow down too. |
Mode: Initial | Only inherit the velocity at the moment the particle is spawned. After that, it flies on its own. |
Multiplier | Inheritance ratio. 0 do not inherit, 1 inherit fully, 0.5 inherit half. |
Example: a moving vehicle creates smoke. The smoke can inherit a bit of the vehicle’s velocity to look more natural, but it should not inherit too much if you want the smoke to lag behind.
14. Lifetime by Emitter Speed: lifetime based on emitter speed
This module adjusts Start Lifetime based on the emitter’s speed when the particle is spawned.
| Property | Effect |
|---|---|
Multiplier | Lifetime multiplier. Can be constant, curve, random constants, random curves. |
Speed Range | The emitter speed range mapped into the curve multiplier. |
Example:
- When the character runs fast, dust lasts longer.
- When the object is standing still, particles barely appear or die quickly.
15. Force over Lifetime: apply force over time
This module adds force to particles, like wind, attraction, repulsion.
| Property | Effect |
|---|---|
X/Y/Z | Force per axis. |
Space | Force in local or world space. |
Randomize | When using random between two constants/curves, each frame chooses a new force direction within the range, creating more chaotic motion. |
Unlike Velocity over Lifetime, Force it is like acceleration: it gradually changes velocity over time.
16. Color over Lifetime: change color/fade over lifetime
This is a very commonly used module.
| Property | Effect |
|---|---|
Color | Color/alpha gradient over the particle’s lifetime. The left side is when it is newly spawned, the right side is when it is about to die. |
For example:
- Fire: bright yellow → orange → dark red → transparent.
- Smoke: light gray, high alpha → dark gray, low alpha → transparent.
- Spark: very bright white/yellow → orange → disappears.
Important tip: if you want particles to fade out smoothly, pull alpha toward 0 at the end of the gradient.
17. Color by Speed: change color according to speed
This module changes color based on the current speed.
| Property | Effect |
|---|---|
Color | Color gradient by speed. |
Speed Range | Low/high speed correspond to the start/end of the gradient. |
For example:
- Fast-flying particles are brighter/yellower.
- When particles slow down, they turn red/darker.
- Used for slash, spark, speed trail.
18. Size over Lifetime: change size by lifetime
This module appears in almost every beautiful effect.
| Property | Effect |
|---|---|
Separate Axes | Adjust size separately for each axis. |
Size | Curve the size over lifetime. |
Example curve:
- Smoke: small at first → gradually larger → fades away.
- Hit flash: very fast growth → quickly smaller/disappears.
- Bubble: slight expansion → bursts.
A simple formula to use:
Start nhỏ → giữa lớn → cuối giữ lớn hoặc giảm nhẹ
Alpha cuối = 0
19. Size by Speed: change size according to speed
| Property | Effect |
|---|---|
Separate Axes | Adjust size separately for each axis. |
Size | Curve the size by speed. |
Speed Range | Low/high speed correspond to the start/end of the curve. |
Use this when you want faster particles to be longer/larger, and slower particles to become smaller.
20. Rotation over Lifetime: rotate by lifetime
| Property | Effect |
|---|---|
Separate Axes | Rotate separately X/Y/Z. |
Angular Velocity | Rotation speed, measured in degrees/second. |
Used for:
- Rotating spark.
- Falling leaves rotate.
- Coin/mDebris pieces spin.
- Randomly rotate smoke textures slowly to reduce repetition.
21. Rotation by Speed: rotate according to speed
| Property | Effect |
|---|---|
Separate Axes | Rotate separately on each axis. |
Angular Velocity | Rotation speed based on speed. |
Speed Range | Map the speed range to a rotation curve. |
For example: debris flying fast rotates quickly, and when it slows down it rotates slowly.
22. External Forces: affected by external forces
This module lets the Particle System receive effects from Wind Zone or Particle System Force Field.
| Property | Effect |
|---|---|
Multiplier | Multiply the strength of the external force. |
Influence Filter | Select the force field by Layer Mask or a specific list. |
List | The force field list affects the system. |
Influence Mask | The layer mask determines which force fields affect it. |
Used for:
- Smoke blown by the wind.
- Magic fields attracting/repelling particles.
- Vortex areas making particles swirl.
23. Collision: particle collision
Collision lets particles react with planes or colliders in the scene.
Type
| Type | Meaning |
|---|---|
Planes | Collide with the planes you specify. Lighter and better controlled. |
World | Collide with real colliders in the world, with mode 2D/3D. More realistic but more expensive. |
Planes properties
| Property | Effect |
|---|---|
Planes | A list of Transforms serving as collision planes. |
Visualization | Display the plane as wireframe or solid in Scene View. |
Scale Plane | Scale the plane preview shape. |
Dampen | How much speed the particle loses after a collision. |
Bounce | How strongly the particle bounces back. |
Lifetime Loss | How much lifetime is lost on collision. |
Min Kill Speed | After a collision, if slower than this value, the particle is killed. |
Max Kill Speed | If faster than this value, the particle is killed. |
Radius Scale | Scale the particle’s collision radius to match the visuals. |
Send Collision Messages | Allow scripts to receive OnParticleCollision. |
Visualize Bounds | Display the collision bounds of each particle. |
World property
| Property | Effect |
|---|---|
Collision Mode | Choose collision 2D or 3D. |
Dampen, Bounce, Lifetime Loss | Similar to Planes. |
Min/Max Kill Speed | Kill the particle based on post-collision speed. |
Radius Scale | The particle’s virtual collider size. |
Collision Quality | High the most accurate but the most expensive; Medium/Low lighter for static colliders. |
Collides With | Particle layer allowed to collide. |
Max Collision Shapes | Maximum number of collision shapes considered. |
Enable Dynamic Colliders | Enable collisions with dynamic colliders. More expensive than static. |
Voxel Size | Grid cache size when using Medium/Low. Smaller is more accurate but uses more memory. |
Collider Force | The particle applies force to physical colliders. |
Multiply by Collision Angle | The force depends on the collision angle. |
Multiply by Particle Speed | Faster particles push harder. |
Multiply by Particle Size | Larger particles push harder. |
Send Collision Messages | Allow scripts to receive collisions. |
Visualize Bounds | View collision bounds in the Scene View. |
Performance tip: if you only need the particle to disappear when it hits a flat ground, use Planes instead of World.
24. Triggers: particles entering/exiting trigger zones
Triggers is not the same as Collision. It lets you handle particles when they:
- Are inside the collider.
- Are outside the collider.
- Have just entered the collider.
- Have just exited the collider.
| Property | Effect |
|---|---|
Inside | Action when the particle is inside the collider. |
Outside | Action when the particle is outside the collider. |
Enter | Action on the frame the particle just enters the collider. |
Exit | Action on the frame the particle just exits the collider. |
Collider Query Mode | Whether to get information about the collider the particle interacts with. Disabled the lightest. |
Radius Scale | Scale the particle’s trigger bounds. |
Visualize Bounds | Display trigger bounds in the Scene View. |
Common actions include:
| Action | Meaning |
|---|---|
Callback | Add the particle to a list for the script to process with OnParticleTrigger(). |
Kill | Delete the particle. |
Ignore | Ignore. |
Example: when a “falling leaf” particle enters a water zone, change the effect; or when a snowflake enters a trigger near the camera, make it disappear.
25. Sub Emitters: particles spawning other particles
Sub Emitters to let a parent particle create another Particle System at its position.
For example:
- A bullet flies and spawns an explosion on impact.
- A firework flies upward and spawns a burst of fireworks when it dies.
- A spark hits the ground and spawns a small puff of smoke.
| Property | Effect |
|---|---|
Spawn condition | When the parent particle spawns child particles. |
Inherit | What properties the child particle inherits from the parent particle. |
Emit Probability | Probability of spawning the sub emitter. 0 do not spawn, 1 always spawn. |
Spawn condition
| Condition | Meaning |
|---|---|
Birth | Spawn the sub emitter when the parent particle is spawned. |
Collision | Spawn when the parent particle collides. |
Death | Spawn when the parent particle dies. |
Trigger | Spawn when the parent particle interacts with a trigger. |
Manual | Spawn only when the script calls ParticleSystem.TriggerSubEmitter. |
A mild warning: Sub Emitters can very easily multiply the number of particles extremely fast. One particle spawns 10 particles, then each of those spawns more… the toaster FPS starts working.
26. Texture Sheet Animation: animate the particle’s texture
A particle does not have to be a static image. This module lets the texture be split into multiple frames, then the particle plays the frames like an animation.
Grid mode
| Property | Effect |
|---|---|
Tiles | Split the texture into how many columns/rows. For example, a 4x4 spritesheet. |
Animation | Whole Sheet run the entire sheet; Single Row run only one row. |
Time Mode: Lifetime | Select frames based on particle age. |
Time Mode: Speed | Select frames based on particle speed. |
Time Mode: FPS | Run by number frame/giof seconds. |
Row Mode | Select a specific row, a random row, or by mesh index. |
Random Row | Each particle picks a random row when using Single Row. |
Row | Select a fixed row. |
Frame over Time | The curve determines frame progression over time. |
Start Frame | Starting frame. Can be randomized so particles are not synchronized too mechanically. |
Cycles | How many times the animation loops over the lifetime. |
Affected UV Channels | Which UV stream this module affects. |
Sprites mode
| Property | Effect |
|---|---|
Frame over Time | Select the sprite frame over time. |
Start Frame | Initial sprite frame. |
Cycles | Number of animation loops. |
Enabled UV Channels | UV channel used. |
Used for:
- Flipbook-style explosions.
- Animated fire.
- Smoke flipbook.
- Animating magic runes.
27. Lights: particles emit real light
This module attaches real-time Light to part of a particle.
| Property | Effect |
|---|---|
Light | Light prefab used for particles. |
Ratio | Ratio of particles with light. 0.1 means about 10%. |
Random Distribution | On: random particles get light; off: distributed cyclically. |
Use Particle Color | Light takes its color from the particle. |
Size Affects Range | A larger particle makes the light range larger. |
Alpha Affects Intensity | A more transparent particle makes the light weaker. |
Range Multiplier | Curve multiplies light range over the lifetime. |
Intensity Multiplier | Curve multiplies light intensity over the lifetime. |
Maximum Lights | Limit the maximum number of lights to avoid lag FPS. |
Mobile tip: real-time lights are very expensive. If you only need glow, additive material or a glow sprite is usually cheaper.
28. Trails: trails left behind particles
Trails for particles to leave a trail behind.
| Property | Effect |
|---|---|
Mode: Particle | Each particle has its own trail. |
Mode: Ribbon | Connect particles into a ribbon based on age. |
Ratio | Ratio of particles with trails. |
Lifetime | How long a trail vertex lives, usually based on particle lifetime. |
Minimum Vertex Distance | How far a particle moves before the trail adds a new vertex. |
World Space | Trail vertices remain in world space, not pulled along with the object. |
Die With Particles | When the particle dies, the trail disappears immediately; if disabled, the trail fades out naturally over its lifetime. |
Ribbon Count | Number of ribbons when using ribbon mode. |
Split Sub Emitter Ribbons | With sub emitters, particles sharing the same parent share one ribbon. |
Texture Mode | How the texture is laid out on the trail: stretch, tile, repeat per segment, distribute per segment. |
Size affects Width | A larger particle makes the trail wider. |
Size affects Lifetime | A larger particle makes the trail live longer. |
Inherit Particle Color | The trail takes its color from the particle. |
Color over Lifetime | The color of the whole trail over particle age. |
Width over Trail | Trail width along the trail length. |
Color over Trail | Trail color along the trail length. |
Generate Lighting Data | Create normal/tangent so the trail receives lighting. |
Shadow Bias | Shadow bias to reduce artifacts. |
Used for:
- Slash trails.
- Shooting stars.
- Spark trails.
- Coin sparkle.
29. Custom Data: custom data for particles
This module lets you add custom data to each particle through 2 channels:
Custom1Custom2
This data is usually used for shaders or special gameplay.
| Property | Effect |
|---|---|
Mode: Disabled | No custom data. |
Mode: Vector | Vector data with up to 4 components: X/Y/Z/W. |
Mode: Color | HDR color/gradient data. |
Number of Components | Number of vector components used, from 1 to 4. |
X/Y/Z/W | Curve or random value for each component. |
Color | Color/gradient/custom color data. |
Advanced example:
- Shader reads
Custom1.xto dissolve particles. - Shader reads
Custom1.yto choose a noise variant. - Gameplay uses custom data to store “temperature,” “damage scale,” or “id.”
Note: if you want to set custom data entirely by script, Unity recommends disabling the module Custom Data.
30. Renderer: how are particles drawn?
Renderer is the module that determines the final image. A particle may be flying very nicely, but if the Renderer material/sort mode is wrong, it still looks broken.
| Property | Effect |
|---|---|
Render Mode: Billboard | Particle is always a quad rotated to match the alignment direction. Most commonly used. |
Render Mode: Stretched Billboard | Particle is stretched along camera/velocity. Used for speed lines, rain, fast sparks. |
Render Mode: Horizontal Billboard | Quad lies parallel to the XZ plane. |
Render Mode: Vertical Billboard | Quad stands upright along the Y axis and faces the camera. |
Render Mode: Mesh | Particle is rendered as a 3D mesh. |
Render Mode: None | Do not draw particles, usually used only when you want to draw Trails. |
Normal Direction | How billboard lighting is calculated: like a sphere or a plane. |
Material | Main material used to render particles. This is where shader/blend mode takes effect. |
Trail Material | Material used for trails. |
Sort Mode | Render order of particles within the same system: by distance, oldest, youngest, by depth… |
Sorting Fudge | Sort order bias between the Particle System and other transparent objects. |
Min Particle Size | Minimum size on the viewport. |
Max Particle Size | Maximum size on the viewport. |
Render Alignment | Particle rotates according to camera, world, local, facing, or velocity. |
Enable Mesh GPU Instancing | When rendering mesh particles, use GPU instancing if the shader supports it. |
Flip | Mirror part of the particle along an axis to create variants. |
Allow Roll | Allow particles to camera-facing rotate around the camera axis. Disabling this is useful in VR. |
Pivot | Move the particle’s rotation pivot. |
Visualize Pivot | Show the pivot in the Scene View. |
Masking | Particle interacts with Sprite Mask: no mask, visible inside, visible outside. |
Apply Active Color Space | When in Linear Color Space, convert particle colors from Gamma before sending GPU. |
Custom Vertex Streams | Choose the particle data sent to the shader. Very important when writing custom shaders. |
Cast Shadows | Whether the particle casts shadows. |
Shadow Bias | Reduce shadow artifacts of billboard/trail. |
Motion Vectors | Whether to write motion vectors for the renderer. |
Receive Shadows | Whether the particle receives shadows. Usually only works well with opaque materials. |
Sorting Layer ID | Renderer sorting layer, very important in 2D. |
Order in Layer | Order within the sorting layer. |
Light Probes | How particles receive lighting from light probes. |
Reflection Probes | How to receive reflection probe. |
Anchor Override | Transform used as the probe interpolation point. |
Stretched Billboard settings
| Property | Effect |
|---|---|
Camera Scale | Stretch particles according to camera movement. |
Velocity Scale | Stretch particles according to speed. |
Length Scale | Stretch according to the current size along the velocity direction. |
Freeform Stretching | Keeps the stretch looking better when viewed head-on. |
Rotate With Stretch | Rotate particles according to the stretch direction. |
Mesh render settings
| Property | Effect |
|---|---|
Mesh Distribution: Uniform Random | Randomize meshes evenly. |
Mesh Distribution: Non-uniform Random | Randomize by weight. |
Mesh Weightings | Meshes with higher weight appear more often. |
Tip: if particles do not appear, check Renderer > Material first. Many “missing” particle bugs are due to material/shader/blend/sorting.
31. Particle System Force Field component
This is not a module inside the Particle System, but a separate component for creating a force area that affects particles when External Forces enabled.
| Group | Property | Effect |
|---|---|---|
Shape | Shape | Shape of the affected area. |
Shape | Start Range | Inner area where the effect starts. |
Shape | End Range | Outer area where the effect ends. |
Shape | Direction X/Y/Z | Linear force along the axis. |
Gravity | Strength | Degree of attraction of particles toward the focal point. |
Gravity | Gravity Focus | Whether the attraction point is at the center or the edge of the shape. |
Rotation | Speed | Spin speed around the vortex. |
Rotation | Attraction | The force that pulls particles into the swirling motion. |
Rotation | Rotation Randomness | Randomize the spin axis. |
Drag | Strength | Drag slows particles down. |
Drag | Multiply Drag by Size | Larger particles experience stronger drag. |
Drag | Multiply Drag by Velocity | Faster particles experience stronger drag. |
Vector Field | Volume Texture | The 3D texture contains a vector field. |
Vector Field | Speed | The strength when particles pass through the vector field. |
Vector Field | Attraction | The force that pulls particles into the vector field motion. |
32. Controlling the Particle System with C
ParticleSystem is a component in UnityEngine.
Basic example:
using UnityEngine;
public class ParticleExample : MonoBehaviour
{
[SerializeField] private ParticleSystem effect;
public void PlayEffect()
{
effect.Play();
}
public void StopEffect()
{
effect.Stop();
}
}
Enable/disable modules by script
Modules in scripts are special structs. You need to take the module out into a local variable and then set it:
var emission = effect.emission;
emission.enabled = true;
emission.rateOverTime = 20f;
Do not write it like this:
// Không compile:
// effect.emission.enabled = true;
Some API commonly used
| API | Effect |
|---|---|
Play() | Play particles. |
Pause() | Pause. |
Stop() | Stop. |
Clear() | Clear living particles. |
Emit(count) | Spawn a number of particles immediately. |
Simulate(time) | Simulate forward to a specific point in time. |
IsAlive() | Check whether there are still living particles or whether it will continue emitting. |
particleCount | The number of particles currently alive. |
TriggerSubEmitter() | Manually activate the sub emitter. |
33. Practical formulas for some effects
Soft cooking smoke
| Module | Suggestion |
|---|---|
Main | Start Lifetime 2-4s, Start Speed low, Simulation Space = World. |
Emission | Rate over Time 5-20. |
Shape | Circle or Cone small. |
Velocity over Lifetime | A slight upward Y. |
Noise | Low Strength-medium, low Frequency. |
Size over Lifetime | Small → gradually larger. |
Color over Lifetime | Light gray with high alpha → alpha 0. |
Renderer | Soft smoke material, transparent/additive depending on the style. |
Spark when receiving coin reward
| Module | Suggestion |
|---|---|
Main | Lifetime 0.3-0.8s, random speed. |
Emission | Burst 10-30, Rate over Time 0. |
Shape | Sphere/Circle small. |
Color over Lifetime | Gold/white → transparent. |
Size over Lifetime | Scale up quickly, then shrink/disappear. |
Trails | Low Ratio-medium if you want sparkle. |
Renderer | Additive material. |
Foot dust when the character runs
| Module | Suggestion |
|---|---|
Main | Simulation Space = World, Lifetime 0.4-1s, light Gravity. |
Emission | Rate over Distance instead of Rate over Time. |
Shape | Circle/Edge at the feet. |
Velocity over Lifetime | Push outward horizontally and slightly upward. |
Noise | Very light. |
Size over Lifetime | Small → large → fade. |
Color over Lifetime | Brown/gray → alpha 0. |
Fast hit impact
| Module | Suggestion |
|---|---|
Main | Very short Lifetime 0.1-0.4s. |
Emission | Single Burst. |
Shape | Cone or Sphere. |
Start Speed | Quite high, random. |
Color over Lifetime | Bright white/gold → alpha 0. |
Size over Lifetime | Pop quickly and then disappear. |
Renderer | Additive or alpha blend depending on the style. |
34. Debug checklist when particles are not as intended
| Symptom | Check |
|---|---|
| No particles visible | Play On Awake, Emission, Renderer Material, layer/camera/sorting, alpha in color. |
| Particles are spawned too few | Rate over Time, Bursts, Max Particles, lifetime is too short. |
| Particles are spawned too many | Rate, Bursts, Sub Emitters, Looping, Max Particles. |
| The effect is being attached to the wrong object | Simulation SpaceTry World instead of Local. |
| Particles are cut off when they go outside the screen/camera | Bounds/culling, Culling Mode, material/sorting. |
| Looks too even/fake | Random Start Size, Start Lifetime, Start Rotation, add a light Noise. |
| Drop FPS | Reduce Max Particles, reduce overdraw/size, disable Lights, reduce Collision, reduce Noise Octaves, limit Sub Emitters. |
| 2D particles are on the wrong layer | Renderer > Sorting Layer ID and Order in Layer. |
| Transparent sort is wrong | Sort Mode, Sorting Fudge, material render queue, sorting layer. |
35. Performance optimization checklist
Particles look nice, but they can be very resource-intensive because of overdraw and particle count.
Prioritize checking:
Max Particlesis too high?- Are the particles too large, covering too much of the screen?
- Does the material additive/transparent cause heavy overdraw?
- Is
Collision World Highenabled? - Are there too many
Sub Emitters? - Is
Lightsenabled for many particles? Noise Octavesis too high?- Are many Particle Systems running in a loop even while off-screen not?
- Have you used effect pooling instead of instantiate/destroy continuously yet?
- Is object/effect turned off when not in use?
For mobile idle games, you usually should:
- Use sprite/material fake glow instead of real-time light.
- Use small bursts, short lifetimes.
- Use pooling for effect prefabs.
- Limit real collision.
- Test on a real device, not just in the Editor.
36. Suggested learning path
If you're just starting out, don't enable all modules at once. Learning in this order will help it stick better:
Main: lifetime, speed, size, color, simulation space.Emission: rate and burst.Shape: spawn area and flight direction.Color over Lifetime: fade in/out.Size over Lifetime: scale over time.Renderer: material, sorting, billboard.Noise: natural motion.Velocity/Force: advanced flight-direction control.Trails: trailing.Collision/Trigger/Sub Emitters: advanced interaction.
A small exercise:
- Create
Smoke. - Create
Coin Spark. - Create
Hit Impact. - Create
Foot Dust.
After these 4 effects, you'll understand most of the real-world particle workflow.