28 lines
786 B
C#
28 lines
786 B
C#
![]() |
namespace AlicizaX.UI.Extension.Editor
|
|||
|
{
|
|||
|
using AlicizaX.UI.Extension;
|
|||
|
using UnityEditor;
|
|||
|
using UnityEditor.UI;
|
|||
|
|
|||
|
[CustomEditor(typeof(UIButtonSuper), true)]
|
|||
|
[CanEditMultipleObjects]
|
|||
|
public class UIButtonSuperEditor : ButtonEditor
|
|||
|
{
|
|||
|
private SerializedProperty m_ButtonUISounds;
|
|||
|
|
|||
|
protected override void OnEnable()
|
|||
|
{
|
|||
|
base.OnEnable();
|
|||
|
m_ButtonUISounds = serializedObject.FindProperty("m_ButtonUISounds");
|
|||
|
}
|
|||
|
|
|||
|
public override void OnInspectorGUI()
|
|||
|
{
|
|||
|
base.OnInspectorGUI();
|
|||
|
serializedObject.Update();
|
|||
|
EditorGUILayout.PropertyField(m_ButtonUISounds); //显示我们创建的属性
|
|||
|
serializedObject.ApplyModifiedProperties();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|