Version: 2017.3
Method group is Obsolete

ParticleSystem.simulationSpace

切换到手册
Obsolete public ParticleSystemSimulationSpace simulationSpace ;

描述

这可选择要在其中模拟粒子的空间。可以是世界或本地空间。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public ParticleSystem part; public bool useLocal = true; void Start() { part = GetComponent<ParticleSystem>(); useLocal = part.simulationSpace == ParticleSystemSimulationSpace.Local; } void Update() { part.simulationSpace = ((useLocal) ? ParticleSystemSimulationSpace.Local : ParticleSystemSimulationSpace.World); } void OnGUI() { useLocal = GUI.Toggle(new Rect(10, 60, 200, 30), useLocal, " Use Local Simulation Space"); } }