Version: 2021.2
언어: 한국어
public ParticleSystemEmitterVelocityMode emitterVelocityMode ;

설명

Control how the Particle System calculates its velocity, when moving in the world.

using UnityEngine;
using System.Collections;

[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { private ParticleSystem ps; public ParticleSystemEmitterVelocityMode velocityMode;

void Start() { ps = GetComponent<ParticleSystem>(); }

void Update() { var main = ps.main; main.emitterVelocityMode = velocityMode; }

void OnGUI() { velocityMode = (ParticleSystemEmitterVelocityMode)GUI.SelectionGrid(new Rect(25, 25, 300, 30), (int)velocityMode, new GUIContent[] { new GUIContent("Transform"), new GUIContent("Rigidbody") }, 2); } }