Access the particle system emission module.
using UnityEngine; using System.Collections;
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) });
AnimationCurve curve = new AnimationCurve(); curve.AddKey(0.0f, 0.1f); curve.AddKey(0.75f, 1.0f); em.rate = new ParticleSystem.MinMaxCurve(10.0f, curve); } }