- Home /
particle system stops normal emissions after .emit() is called
i have a particle system with an emission rate set to 3, its works up until i call its emit function with 25 particles. then it just stops, and nothing will turn its normal 3 emission back on except restarting the scene.
if you would like to see the code its here:
function Attacked(att:Attack)
{
if(att.type == "Kick" || att.type == "Blunt")
{
health -= 10;
fireLight.range -= 1.5;
fireLight.intensity -= .35;
fire.emissionRate -= 6;//differant ParticleSystem
}
sparks.Emit(25); // this is the ParticleSystem in question
}
nothing special just an emit at that line
does anyone know whats going on?
Answer by CanisLupus · Nov 13, 2014 at 11:38 AM
In my case, calling Play
right after Emit
solved the problem, by forcing the system to not pause. :)
BonfireParticleSystem.Emit(10);
BonfireParticleSystem.Play();
I'm sorry for answering this question after all this time, but I stumbled here after also having faced this problem.
As in your case, my ParticleSystem stopped its "normal" emission after having Emit(10)
called to do a "burst" effect of 10 particles. The emissionRate
property had the original value (from before Emit(10)
) the whole time. After 1 second passed (the duration of the ParticleSystem), isPlaying
started returning false
because the system somehow paused after having Emit called, even if it was playing normally before. Calling Play
seems to fix this.
ha, thanks. the project i was doing this in is long gone now but i wouldn't doubt i will come across this again, and now i know how to fix it. thanks :)
Haha glad to know it's still relevant :) You're welcome!
Thank you so much! I have searched the forums so much for the answer to this mystery! Is this to be considered a bug in unity? Why does it pause when we call "Emit ()"? If we wanted it to pause we'd call a funciton for that ins$$anonymous$$d. I'll report it!
@Ylor I honestly don't know why it works like that. :) It's probably a bug, or at least I don't see a reason why it should pause after an Emit. Thanks for reporting it. You're doing what I should have done! :s
Your answer
Follow this Question
Related Questions
'Swap' a particle from one system to another, keeping it's position 0 Answers
Manually and efficiently placing thousands of particles 0 Answers
Emit Random Particles? 2 Answers
How to force a particle system emit from every vertex a mesh have? 3 Answers
Particles emit in the same direction twice if they hit a collider 0 Answers