Engine Particles not working with bursts

I think I found an issue with this implementation of particle handling, where if you try to do bursts with engine, particles wont work untill all previous particles are dead. (In Unity 2021.3.6f1)

What I mean is, if you use something like:

if (mainEngineParticles.isStopped) mainEngineParticles.Play();

It will not let to play the particle system before all particles from previous burst are dead, and isStopped returnes false until all the particles die.

Solution I found is using ParticleSystem.isEmitting It lifts the issue and lets the system play again before previous burst patricles are gone. You than need to check if it is not emitting:

 if (!mainEngineParticles.isEmitting) mainEngineParticles.Play();

What Im not sure is why the first solution is not working, because API documentation for [ParticleSystem].isStopped states:

This property is true after a call to [ParticleSystem.Stop] stops the system, if a non-looping system finishes playing and all its particles die, or if the system has not yet played.

I mean - idd it is written, that all particles have to die in non-looping system, but on the other hand - I did call ParticleSystem.Stop() on that system before. So I guess being it non-looping takes precedence.

3 Likes

Oh man, great catch! I was having issues with my main engine “spurting” instead of giving a consistent boost effect. Not sure if this is something in which the functionality of the Unity code has changed since Rick did this lecture, but your solution worked perfectly. I’m going to dig into the functional differences between isStopped/isPlaying and isEmitting. I feel like that’s going to be pretty relevant down the road.

1 Like

Privacy & Terms