Version: 2023.2
public ParticleSystemCullingMode cullingMode ;

描述

配置粒子系统在屏幕外时是否仍然会在每个帧中进行模拟。

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; } }