emitterVelocityMode
Control how the Particle System calculates its velocity, when moving in the world.
Read time 1 minuteLast updated 8 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.ParticleSystemModule
public ParticleSystemEmitterVelocityMode emitterVelocityMode { get; set; }
Examples
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); }}