When ParticleSystem.MainModule.ringBufferMode is set to loop, this value defines the proportion of the particle life that is looped.
This enables you to use other particle properties that are applied over the particle lifetimes, such as Size over Lifetime. When the particle needs to be replaced, it plays from its current age until its full lifetime has elapsed. Then, it's removed.
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { private ParticleSystem ps;
void Start() { ps = GetComponent<ParticleSystem>(); }
void Update() { var main = ps.main; main.ringBufferLoopRange = new Vector2(0.1f, 0.6f); } }
Did you find this page useful? Please give it a rating: