Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


loop

Specifies whether the Particle System is looping.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.ParticleSystemModule
public bool loop { get; set; }

Remarks

If you disable looping on a playing Particle System, it stops at the end of the current loop.

Examples

using UnityEngine;using System.Collections;[RequireComponent(typeof(ParticleSystem))]public class ExampleClass : MonoBehaviour{ private ParticleSystem ps; void Start() { ps = GetComponent<ParticleSystem>(); var main = ps.main; main.loop = true; }}