We have that code from Unity documentation for particle system:
public class ExampleClass : MonoBehaviour {
void Start() {
ParticleSystem ps = GetComponent<ParticleSystem>();
var em = ps.emission;
em.enabled = true;
em.type = ParticleSystemEmissionType.Time;
em.SetBursts(
new ParticleSystem.Burst[]{
new ParticleSystem.Burst(2.0f, 100),
new ParticleSystem.Burst(4.0f, 100)
});
}
}
1) Is var means ParticleSystem.EmissionModule ?
2) How em affect ps.emission without writing ps.emission = em;
?