Updated: Apr 13, 2021
Written By: Saniya Kalamkar
Introduction to the Particle System
Unity contains a particle system that allows you to produce special effects and is another important built in component. You can create any number of special effects, such as smoke, clouds, flames, magic, and any other visual effect you can think of. You use a particle system whenever you want to add an effect that is difficult to simulate with anything else. Every great game has a particle system involved. Particles are any individual texture, material, or anything created by the Particle System. Note: Just like any other component in Unity, you can edit the Particle System by scripting.
Adding a Particle System Component:
To attach a particle system to an existing GameObject, you would click on the GameObject and in the Inspector window, click on Add Component. Then click on Particle System. A bunch of properties in the Particle System component that are visible in the Inspector window.
There are a lot of properties in the Particle System and so it would be impossible to explain them all. However, we will go over some basic and common properties in the Particle System. If you want to learn any more properties, I would suggest just experimenting with them in your free time. The properties are pretty self-explanatory, so you shouldn't have too much trouble understanding them.
Let’s begin. To start with, there are tabs within the Particle System called Modules. There is a Main Module, which are the default properties. If you want to venture into further complexity, you would use other modules, such as the Shape and Emission Modules.
Main Module Properties (Most Important):
Duration: How long particle runs
Looping: Determines if the particle repeats
Prewarm: Only used when the looping property is checked. It controls whether the particle looks like it has already been simulated for one loop when it is visible.
Start Delay: The delay from before the particle starts emitting.
Start Lifetime: How long until the particle gets destroyed, the initial lifetime.
Start Speed: Initial speed of the particles. They will be more spread out if they are moving at a faster speed.
Start Color: Initial color of particles
Ring Buffer Mode: This keeps the particles from existing until they reach a certain threshold, in which case the old particles are recycled. (No particles are destroyed).
Play on Awake: The particles only are emitted when enabled. Meaning it will only start when it is activated by a script or Animation system.
Culling Mode: Pauses particles when they are offscreen. This is always a good property to enable.