using UnityEngine;

[RequireComponent(typeof(ParticleSystem))]
public class ParticleSystemSortingOrder : MonoBehaviour {

    public int sortingOrder = 0;

    void Awake(){
        GetComponent<ParticleSystemRenderer>().sortingOrder = sortingOrder;
    }

    void OnValidate(){
        GetComponent<ParticleSystemRenderer>().sortingOrder = sortingOrder;
    }
}
