18 lines
568 B
C#
18 lines
568 B
C#
using UnityEditor;
|
|
|
|
namespace AibisDream.SystemEditor
|
|
{
|
|
[CustomEditor(typeof(ActorSlot))]
|
|
public class ActorSlotEditor : Editor
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
var example = (ActorSlot)target;
|
|
// 先绘制默认的 Inspector
|
|
DrawDefaultInspector();
|
|
// 重画UI
|
|
example.sortingLayer = EditorKit.SortingLayerField("目标层级", example.sortingLayer);
|
|
example.sortingOrder = EditorGUILayout.IntField("层级顺序", example.sortingOrder);
|
|
}
|
|
}
|
|
} |