- Home /
Pre-calculating Particles
Hey everyone, I'm having trouble finding a script that will allow me to pre-render or pre-calculate my particles to get them to appear when the scene is first entered. I'm trying to create this effect with particles in the background, however I don't want the player to wait until it can be seen... THANKS
Answer by Eric5h5 · Aug 15, 2011 at 10:40 PM
Use ParticleEmitter.Simulate. For larger amounts of time, it works better if you call it multiple times with small increments:
// Simulate 10 seconds
for (i = 0; i < 10; i++) {
ParticleEmitter.Simulate(1.0);
}
Thanks!... I was hoping someone would answer using this method
Answer by Rennat · Aug 15, 2011 at 09:49 PM
I don't know of a way to start a ParticleEmitter mid-stream like you mentioned. Perhaps creating your own particle emitter class would be called for here. I've never tried but I assume you can subclass ParticleEmitter.
You could make the ParticleEmitter's emission ellipse large enough to cover the area you want particles to start in but that may break the look you had created.
I have seen people use scene transitions or small intro animations to allow particle emitters time to reach full effect.
What specifically is this emitter doing? There may be a better way to "fake" pre-calculating it depending on the context.
Yea that's what I started doing in case there was no answer. I'm working on creating the right starting particles and have it merge to the initial effect, thanks.
I agree. Either subclass it or start with larger/faster values to shoot particles out very fast, then change them quickly down to the normal values, but that might be quite tricky. Have you looked at some of the particle systems in the Asset Store?
Answer by PatHightree · Aug 15, 2011 at 10:37 PM
You can set Time.timeScale to 100, wait 5 seconds (in scaled time) and set it back to 1. This will take 0.05 seconds, now your particle system is up and running. Ofcourse this is a global thing, so this might not work in your situation.
Your answer
Follow this Question
Related Questions
Pre-calculating Particles (how to implement) 1 Answer
Unity drawing bug? 1 Answer
Why aren't my particle systems batched? 1 Answer
Overlapping particle systems 0 Answers
Shaders not working on particles in Unity 5! -1 Answers