ParticleSystem how to turn it on again after turning it off before all particles die

I’m new to particles and Particle systems and I am finding a lot about ParticleEmitter which seems to be from the old particle system. All I want to do is to be able to turn on and off my particle system whenever anyone double clicks. As of right now it can turn on and off, but if I turn it off it won’t turn back on until all of the particles from when it was previously on are dead. Here’s my code (very simplistic):

void Update()
	{
		if(Input.GetButtonDown("Fire1"))
		{
			if(Time.time - lastClickTime < catchTime) //double click
			{
				print ("Double Click!");
				if(particles.isPlaying)
				{
					particles.Stop();

				}

				if(particles.isStopped)
					particles.Play();
			} else {
				print ("Only single clicked!");
			}
			lastClickTime = Time.time;
		}
	}

any help would be greatly appreciated! Thank you!

Hello,

maybe try to set the particles.enableEmission boolean to false and then back to true while playing?

Found my problem.
particles.isStopped only returns true when all particles are dead. Here’s my new code that works great now!

bool particlesOn;

if(Input.GetButtonDown("Fire1"))
		{
			if(Time.time - lastClickTime < catchTime) //double click
			{
				print ("Double Click!");
				if(particlesOn)
				{
					particles.Stop();
					particlesOn = false;
					print ("particles should be off");


				}
				else
				if (!particlesOn)
				{
					particles.Play();
					particlesOn = true;
					print ("particles should be on");
					
				}
			} else {
				print ("Only single clicked!");
			}
			lastClickTime = Time.time;
		}
	}