- Home /
Is it possible to adjust the properties of already generated particles?
I’m trying to figure out a way for my particle system to instantly dissipate once an event is triggered. The initial start lifetime that I set for each particle is too slow for what I’m looking for so I've been trying to seek out a way to alter the properties of already generated particles. Any help would be greatly appreciated.
Answer by Chronos-L · Jan 05, 2013 at 08:11 AM
For Shuriken particle system, you can use either of the following way to instantly kill all your particle:
ParticleSystem.Clear will remove all the particles immediately
You can use Particle.lifetime, you access the
Particle
array in your particle system viaGetParticle
and for each particle, you set the lifetime to less that 0. You thenSetParticle
to set the modified particle back into the particle system. This is a more tedious step, but you can put some delay on the particle dissipation if you wish to (by setting thelifetime
to 0.5f or a very small value). Unity Shuriken Particle System Script Reference
If you are using Legacy particle system, you can look for Legacy particle system in the script reference, I think you can use the same techniques mentioned in this answer.