Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

How to stop particles?

Discussion in 'Project Tiny' started by developer_plus, Apr 8, 2019.

  1. developer_plus

    developer_plus

    Joined:
    Jan 10, 2017
    Posts:
    7
    Is there an option in project Tiny to not looping particles, just setting a duration? or there is a way to Stop/Play particles by code?
     
  2. Rupture13

    Rupture13

    Joined:
    Apr 12, 2016
    Posts:
    77
    Adding the BurstEmission component from the Particles Family to your Particle System in the Inspector, you can set it up so it won't loop.

    Via code you can set the emitRate of the
    ut.Particles.ParticleEmitter
    component to 0 to smoothly make it stop playing particles. If you save the value before you set it to 0 in a component somewhere, you can later "start/resume" the particle playing by setting the same emitRate to the original value you saved.
     
unityunity