using UnityEditor; using UnityEngine; namespace AibisDream.SystemEditor { [CustomPropertyDrawer(typeof(CustomSortingLayerAttribute))] public class SortingLayerDrawer : PropertyDrawer { public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { // 获取属性 property.intValue = EditorKit.SortingLayerField("目标层级", property.intValue); } } }