Version: 2021.1
言語: 日本語
public ParticleSystemEmitterVelocityMode emitterVelocityMode ;

説明

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

using UnityEngine;
using System.Collections;

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