main
Access the main Particle System settings.
읽는 시간 1분최근 업데이트: 한 달 전
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.ParticleSystemModule
public ParticleSystem.MainModule main { get; }
Remarks
This module provides access to the general settings that are displayed above all of the other module settings in the Particle System's Inspector window.
Particle System modules do not need to be reassigned back to the system; they are interfaces and not independent objects.
Examples
// Create a Particle System // Set a 5 second start delay for the system, and a 2 second lifetime for each particleusing UnityEngine;using System.Collections;[RequireComponent(typeof(ParticleSystem))]public class ExampleClass : MonoBehaviour{ void Start() { ParticleSystem ps = GetComponent<ParticleSystem>(); var main = ps.main; main.startDelay = 5.0f; main.startLifetime = 2.0f; }}