how to change particle system rate over time unity

110

how to change particle system rate over time unity -

//objectName.GetComponent<ParticleSystem>().emission.rateOverTime = 2.0f;
//This doesn't work, so you need to seperate it into a few lines.
ParticleSystem particleSystem = objectName.GetComponent<ParticleSystem>();
var emission = particleSystem.emission;
emission.rateOverTime = 2.0f;

Comments

Submit
0 Comments