Version: 2023.2
언어: 한국어
public Transform customSimulationSpace ;

설명

Simulate particles relative to a custom transform component.

Additional resources: 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; } }