访问粒子系统的轨迹模块。
using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Start() { ParticleSystem ps = GetComponent<ParticleSystem>(); var trails = ps.trails; trails.enabled = true; trails.ratio = 0.5f; } }