Low particle emission rate
Hi guys I was making a game in older unity versions (5.1~5.2), when I upgrade it to version 5.3, my particle systems stopped to work, they doesn't emmit correctly, anyone know what can it be? I tried to activate VSync but it doesn't works too.
Can you post a screenshot of the particle settings?
Answer by Feinoko · Jan 03, 2016 at 02:01 PM
I believe it's something to do with the new syntax since 5.3, use "emission.rate" i/o "EmissionRate".
However when i replace with this new syntax, I get a compiling error :(
What compiler error? Its a struct so you need to make a local reference before setting the rate or you will get an error.
I don't set emission rate trough script, I just enable it. I try to create a particle and move it trough the scene manualy, and i had the same result.
I am still in the process of converting my scripts as well... I created code below that you use and change to fit your needs. Let us know how it works.
public ParticleSystem part;
setpart(10);
void setpart(float rate) {
var er = part.emission.rate;
er.constant$$anonymous$$in = rate;
er.constant$$anonymous$$ax = rate;
}
void getpart() {
var er = part.emission.rate;
Debug.Log("$$anonymous$$: " + er.constant$$anonymous$$in);
Debug.Log("max: " + er.constant$$anonymous$$ax);
}
Your answer
Follow this Question
Related Questions
particle collision events networking 0 Answers
How Play and Stop a ParticleSystem through Scripting? 9 Answers
Circle shape emitter is flipping particles on one side 1 Answer
help with particle projector 0 Answers
Emit Particles in 45 degree steps ? 1 Answer