Unity 6.3
0 онлайн 87 гостей 3 в системе
Вход

ParticleSystem.MainModule.emitterVelocityMode

Declaration

public ParticleSystemEmitterVelocityMode emitterVelocityMode;

Описание

Контроль того, как Particle System рассчитывает свою скорость, когда движется в мире.

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