三国卡牌客户端基础资源仓库
yyl
2025-08-25 214fe94eaf7f09741a7857775dfffe8c3b83c75c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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();
    }
}