- Home /
Access emission bursts through code
I'd like to turn the bursts on and off under certain conditions but I have a feeling you can't access that in code. Am I missing something or is it true that it's not yet implemented?
You can manually emit however many particles you want via particleSystem.Particles.Emit(int count);
Yeah, I know that much. Sorry, I don't think I was clear enough when I wrote this. haha But I mean there is a manual option (not through code) in the new particle system in the Emission tab that is called Bursts with a Time and a Particle variable. But I have yet to discover direct access to these bursts through code and I'm inclined to think they haven't been implemented yet. I'll have to find some form of work around. Thanks for the reply by the way!
if you need a simple timer in Unity just use Invoke() or InvokeRepeating() hope it helps!
Answer by jmatthews · Mar 30, 2013 at 08:01 PM
If you create a timer variable and call particleSystem.Particles.Emit(int count); when your timer triggers you'll have the exact same functionality. No need to wait for them to open up a specific API to do it.
Yes. That'll probably work. I was thinking of using that method. Thank you.