| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
 | | using UnityEditor; |  |   |  | [CustomEditor(typeof(TextEx),true),CanEditMultipleObjects] |  | public class TextExEditor:UnityEditor.UI.TextEditor { |  |   |  |     public override void OnInspectorGUI() { |  |         base.OnInspectorGUI(); |  |         EditorGUILayout.Space();         |  |         TextEx text = target as TextEx; |  |         text.isKey = EditorGUILayout.Toggle("是语言表ID",text.isKey); |  |         text.colorType = (TextColType)EditorGUILayout.EnumPopup("颜色类型", text.colorType); |  |     } |  |   |  | } | 
 |