using System.Collections; using System.Collections.Generic; using UnityEngine; [ExecuteInEditMode] public class MeshRendererOrder : MonoBehaviour { public int Order; void OnEnable() { GetComponent().sortingOrder = Order; } void OnValidate() { GetComponent().sortingOrder = Order; } }