Files
aibis-dream/Assets/Editor/Inspector/SortingLayerDrawer.cs
T

15 lines
449 B
C#

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);
}
}
}