- Home /
Pre-calculating Particles (how to implement)
As in another question here I want to prerender particles. It's for a background of stars moving down the screen, but at the start of play they have to flow down first.
The other question has an answer, but I don't understand how to implement it. The answer given was:
// Simulate 10 seconds
for (i = 0; i < 10; i++) {
ParticleEmitter.Simulate(1.0);
}
But where do I put this? I tried making a script and adding it to the emitter with this inside a Start() fucntion, but just got an error.
Thanks for any help given, hope I asked this in the right place (it seems to be a new question even if it's intimately related to the other question)
Answer by ThermalFusion · Aug 15, 2012 at 07:52 PM
Use particleEmitter instead of ParticleEmitter. better yet, replace the entire thing with particleEmitter.Simulate(10);
Okay, but the 10 doesn't work. Searched some more and found this thread: http://forum.unity3d.com/threads/47229-particleEmitter.Simulate-Woes And got the following code from it (though it doesn't work on i-phone, apparently) for (i = 0; i < 10; i++) { particleEmitter.Simulate(1); } I experimented and you just can't set it to ten, oddly enough.
Your answer
![](https://koobas.hobune.stream/wayback/20220613075704im_/https://answers.unity.com/themes/thub/images/avi.jpg)