Files
Continentis/Assets/OtherPlugins/Feel/MMTools/Accessories/MMParticles/MMVisibleParticle.cs
SoulliesOfficial 9b1b5ca93f initial
2025-10-03 00:02:43 -04:00

20 lines
561 B
C#

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