# Particles

<figure><img src="https://3846168334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhjeEdzvIH0d5vrHiguxu%2Fuploads%2Fst7TVK5oRcqYeBYxNYwI%2FScreenshot%202025-01-28%20210740.png?alt=media&#x26;token=02b7f106-27ae-4d4c-9c72-f12e0417bc9c" alt=""><figcaption></figcaption></figure>

Unity already has a easy-to-use playback system for a single particle system. This works great when testing a single particle system, but sometimes when you have multiple particle systems that should work together, playback becomes a hassle.&#x20;

Solution; our `Particle` script:

<figure><img src="https://3846168334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhjeEdzvIH0d5vrHiguxu%2Fuploads%2FNM1PPxtCGs1wa9AKUWaQ%2FScreenshot%202025-01-29%20142844.png?alt=media&#x26;token=4c52c038-ba4b-4bbe-98a2-e1f116e986d0" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
The playback in this script allows children of the object to also be affected by the playback.
{% endhint %}

The particle script also has built-in disposing/clearing system:

<figure><img src="https://3846168334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhjeEdzvIH0d5vrHiguxu%2Fuploads%2FMnC1hSb4uLP4MohokwbD%2Fimage.png?alt=media&#x26;token=06275c50-5180-4b33-8745-e61aecc30c8c" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you desire to pool the particle; the package includes a separate `Particle` script under the `Particles/Poolable/<desired fx type>/Scripts/Particle`.
{% endhint %}

Lastly, the script allows you to specify the particles `Lifetime`. Originally, this is not set and will simply dispose the particle whenever **all** particles are destroyed & have stopped emitting. Usually, this property does **not** need to be changed, but in some cases it may be beneficial:

> If you want the particle to be disposed instantly: enable `Lifetime` and set it to `0`.
>
> If you want the particle to live longer, past it has stopped emitting any particles (could come in handy if there is some delay between particles spawning): enable `Lifetime` and set it to desired lifetime.
