I really don’t get this new method of controlling particle emission rate. I have just spent 3+ hours looking at dozens of page describing variations of ways of controlling particle emission rate. And yet…I am still no closer to getting it to work.It is incomprehensible to me.
All i want to do is adjust ONE variable over gameplay . The emission rate. And yet this is proving to be almost impossible to achieve. How can something so basic and vital to gameplay be turned into something so horrendous to use?.
was currently using Unity 5.3.5f1
just updated to 5.4 which I thought would have addressed this issue…
current code:
- var SmokeParticles : ParticleSystem;
- var em : ParticleSystem.EmissionModule;
- var emitRate :float;
-
- functionStart(){
- em=SmokeParticles.emission;
- em.rate.mode =ParticleSystemCurveMode.Constant;
- }
-
- functionFixedUpdate(){
- var rate =SmokeParticles.emission.rate;
- rate.mode =ParticleSystemCurveMode.Constant;
- rate.constantMin = emitRate;
- rate.constantMax = emitRate;
- em.rate = rate;
- }