using UnityEditor;
|
using UnityEngine;
|
|
[CustomEditor(typeof(ImageEx), true), CanEditMultipleObjects]
|
public class ImageExEditor : UnityEditor.UI.ImageEditor
|
{
|
|
SerializedProperty m_Gray;
|
SerializedProperty m_IconKey;
|
|
protected override void OnEnable()
|
{
|
base.OnEnable();
|
m_Gray = this.serializedObject.FindProperty("m_Gray");
|
m_IconKey = this.serializedObject.FindProperty("m_IconKey");
|
}
|
|
public override void OnInspectorGUI()
|
{
|
base.OnInspectorGUI();
|
EditorGUILayout.Space();
|
|
EditorGUILayout.PropertyField(m_Gray, new GUIContent("Gray"));
|
EditorGUILayout.PropertyField(m_IconKey, new GUIContent("IconKey"));
|
|
base.serializedObject.ApplyModifiedProperties();
|
Repaint();
|
}
|
|
}
|