using UnityEditor;
|
using UnityEngine;
|
|
[CustomEditor(typeof(GroupButtonEx), true), CanEditMultipleObjects]
|
public class GroupButtonExEditor : ButtonExEditor
|
{
|
SerializedProperty managerProperty;
|
SerializedProperty selectIconProperty;
|
SerializedProperty unselectIconProperty;
|
SerializedProperty titleProperty;
|
SerializedProperty effectProperty;
|
|
protected override void OnEnable()
|
{
|
base.OnEnable();
|
managerProperty = serializedObject.FindProperty("m_Manager");
|
selectIconProperty = serializedObject.FindProperty("m_SelectIcon");
|
unselectIconProperty = serializedObject.FindProperty("m_UnSelectIcon");
|
titleProperty = serializedObject.FindProperty("m_Title");
|
effectProperty = serializedObject.FindProperty("m_SelectEffect");
|
}
|
|
public override void OnInspectorGUI()
|
{
|
base.OnInspectorGUI();
|
|
serializedObject.Update();
|
|
EditorGUILayout.Space();
|
EditorGUILayout.LabelField("GroupButtonEx Settings", EditorStyles.boldLabel);
|
|
EditorGUILayout.PropertyField(managerProperty, new GUIContent("Manager"));
|
EditorGUILayout.PropertyField(selectIconProperty, new GUIContent("Select Icon"));
|
EditorGUILayout.PropertyField(unselectIconProperty, new GUIContent("Unselect Icon"));
|
EditorGUILayout.PropertyField(titleProperty, new GUIContent("Title"));
|
EditorGUILayout.PropertyField(effectProperty, new GUIContent("SelectEffect"));
|
|
serializedObject.ApplyModifiedProperties();
|
}
|
}
|