配置粒子系统是否在屏幕外时仍将在每一帧进行模拟。
using UnityEngine; using System.Collections;
[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { private ParticleSystem ps;
void Start() { ps = GetComponent<ParticleSystem>();
var main = ps.main; main.cullingMode = ParticleSystemCullingMode.AlwaysSimulate; } }