1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| //--------------------------------------------------------
| // [Author]: 玩个游戏
| // [ Date ]: Tuesday, August 15, 2017
| //--------------------------------------------------------
| using UnityEditor;
|
|
| [CustomEditor(typeof(ToggleEx), true), CanEditMultipleObjects]
| public class ToggleExEditor : UnityEditor.UI.ToggleEditor
| {
| public override void OnInspectorGUI()
| {
| base.OnInspectorGUI();
|
| EditorGUILayout.Space();
| ToggleEx toggle = target as ToggleEx;
| toggle.clickAudio = EditorGUILayout.IntField("音效", toggle.clickAudio);
| }
|
| }
|
|