Script interface for the Particle System Noise module.
通过噪声模块可将湍流应用于粒子的移动。使用低品质设置可按计算方式创建高效的噪声,使用更高品质设置模拟更平滑、更丰富的噪声。还可以选择为每个轴单独定义噪声的行为。
Particle System modules do not need to be reassigned back to the system; they are interfaces and not independent objects.
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void Start() { ParticleSystem ps = GetComponent<ParticleSystem>(); var no = ps.noise; no.enabled = true; no.strength = 1.0f; no.quality = ParticleSystemNoiseQuality.High; } }