using UnityEngine; using System.Collections; namespace MoreMountains.Tools { /// /// Adds this class to particles to force their sorting layer /// [AddComponentMenu("More Mountains/Tools/Particles/MMVisibleParticle")] public class MMVisibleParticle : MonoBehaviour { /// /// Sets the particle system's renderer to the Visible Particles sorting layer /// protected virtual void Start () { GetComponent().GetComponent().sortingLayerName = "VisibleParticles"; } } }