ParticleSystem.MainModule.customSimulationSpace
Declaration
public Transform customSimulationSpace;Описание
Моделирование частиц по отношению к пользовательскому компоненту преобразования.
Дополнительные ресурсы: ,ParticleSystemSimulationSpace.Custom,.
using System.Collections; using UnityEngine;
[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { private ParticleSystem ps; public Transform relativeTo;
void Start() { ps = GetComponent<ParticleSystem>();
var main = ps.main; main.simulationSpace = ParticleSystemSimulationSpace.Custom; main.customSimulationSpace = relativeTo; } }