| | |
| | | using UnityEditor; |
| | | |
| | | [CustomEditor(typeof(TextImage), true), CanEditMultipleObjects] |
| | | public class TextImageEditor : TextExEditor |
| | | public class TextImageEditor : TextExEditor
|
| | | { |
| | | |
| | | SerializedProperty sprite; |
| | | protected override void OnEnable() |
| | | { |
| | | base.OnEnable(); |
| | | sprite = serializedObject.FindProperty("m_Sprite"); |
| | | SerializedProperty sprite;
|
| | | protected override void OnEnable()
|
| | | {
|
| | | base.OnEnable();
|
| | | sprite = serializedObject.FindProperty("m_Sprite");
|
| | | } |
| | | |
| | | public override void OnInspectorGUI() |
| | | { |
| | | base.OnInspectorGUI(); |
| | | EditorGUILayout.Space(); |
| | | |
| | | EditorGUILayout.PropertyField(sprite); |
| | | base.serializedObject.ApplyModifiedProperties(); |
| | | } |
| | | |
| | | |
| | | public override void OnInspectorGUI()
|
| | | {
|
| | | base.OnInspectorGUI();
|
| | | EditorGUILayout.Space();
|
| | |
|
| | | EditorGUILayout.PropertyField(sprite);
|
| | | base.serializedObject.ApplyModifiedProperties();
|
| | | }
|
| | |
|
| | |
|
| | | } |