Access the particle system shape module.
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void Start() { ParticleSystem ps = GetComponent<ParticleSystem>(); var sh = ps.shape; sh.enabled = true; sh.shapeType = ParticleSystemShapeType.Mesh; sh.mesh = myMesh; } }