From 1446fefaa94cc7608ddd40ed6374b555bb64a9e1 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 08 一月 2019 15:33:12 +0800
Subject: [PATCH] 5715 【1.4.100】【前端】界面支持不同平台打包替换资源-充值界面
---
Assets/Editor/UIComponent/ImageExEditor.cs | 27 ++++++++++++++++++++++-----
1 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/Assets/Editor/UIComponent/ImageExEditor.cs b/Assets/Editor/UIComponent/ImageExEditor.cs
index 10a26c7..c772fd6 100644
--- a/Assets/Editor/UIComponent/ImageExEditor.cs
+++ b/Assets/Editor/UIComponent/ImageExEditor.cs
@@ -1,13 +1,30 @@
锘縰sing UnityEditor;
+using UnityEngine;
-[CustomEditor(typeof(ImageEx),true),CanEditMultipleObjects]
-public class ImageExEditor:UnityEditor.UI.ImageEditor {
+[CustomEditor(typeof(ImageEx), true), CanEditMultipleObjects]
+public class ImageExEditor : UnityEditor.UI.ImageEditor
+{
- public override void OnInspectorGUI() {
+ 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();
- ImageEx image = target as ImageEx;
- image.gray = EditorGUILayout.Toggle("Gray",image.gray);
+
+ EditorGUILayout.PropertyField(m_Gray, new GUIContent("Gray"));
+ EditorGUILayout.PropertyField(m_IconKey, new GUIContent("IconKey"));
+
+ base.serializedObject.ApplyModifiedProperties();
+ Repaint();
}
}
--
Gitblit v1.8.0