Particles
Particles are something that most games use extensively. We have aimed to make it easy to control playback and the disposing of particles.
Last updated
Particles are something that most games use extensively. We have aimed to make it easy to control playback and the disposing of particles.
Last updated
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.
Solution; our Particle
script:
The playback in this script allows children of the object to also be affected by the playback.
The particle script also has built-in disposing/clearing system:
If you desire to pool the particle; the package includes a separate Particle
script under the Particles/Poolable/<desired fx type>/Scripts/Particle
.
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 to0
.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.