Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. 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:
    10
    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:
    129
    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.