I’m just wondering if changing the “Stop Action” to “destroy” directly from the “Particle effect” settings it’s the same as writing "Destroy(Sparkles, 1f) into the script?
Thank you!
I’m just wondering if changing the “Stop Action” to “destroy” directly from the “Particle effect” settings it’s the same as writing "Destroy(Sparkles, 1f) into the script?
Thank you!
Hi Cristian,
Yes, it is almost the same, arguably easier to use however it is also a little bit descrete, so something to be aware of it if you are using Destroy
elsewhere in your code and then use this functionality.
When you use Destroy as the stop action the ParticleSystem will be destroyed once the last emitted particle has died. Where-as the code example you gave above will specifically destroy the ParticleSystem after 1 second, which may, or may not relate to the duration of the emission.
Hope this helps
See also;
I also used the “Stop Action” of the Particle system to Destroy the game object has it is more accurate and allow us to change the duration of the particle without remembering that we also have to change the Destroy delay