| 1
2
3
4
5
6
7
8
9
10
11
12
13
 | | using UnityEditor; |  |   |  | [CustomEditor(typeof(ImageEx),true),CanEditMultipleObjects] |  | public class ImageExEditor:UnityEditor.UI.ImageEditor { |  |   |  |     public override void OnInspectorGUI() { |  |         base.OnInspectorGUI(); |  |         EditorGUILayout.Space(); |  |         ImageEx image = target as ImageEx; |  |         image.gray = EditorGUILayout.Toggle("Gray",image.gray); |  |     } |  |   |  | } | 
 |