- Home /
ParticleSystem.EmitParams (Unity 5.3)
I just had a quick question on how to use the recently added ParticleSystem.EmitParams. The documentation is a bit sparse on it and I've been having trouble figuring out how to use the reset functions like ParticleSystem.EmitParams.ResetPosition.
You never pass in a ParticleSystem and it has no reference to an existing ParticleSystem to be able to do what it claims (reset ParticleSystem values to inspector value). Am I missing something?
Also, since EmitParams is a struct, it overrides ALL the EmitParams variables (position, angularVelocity, etc) while the documentation hints that it is intended to be used to override specific values only. Not sure how useful the addition of the struct is unless you want to override all ParticleSystem values at once.
Answer by avclubvids · Apr 24, 2016 at 07:36 AM
I was banging my head up against the same wall until I found the comment at the bottom of this question:
http://answers.unity3d.com/questions/1122513/particle-system-fails-to-emit-after-last-particle.html
Saved my sanity big time. In case the link does not work, here is how to use the ParticleSystem.EmitParams struct:
ParticleSystem.EmitParams emitOverride = new ParticleSystem.EmitParams();
emitOverride.startLifetime = 0.25f;
ps.Emit(emitOverride, 1);