From 8b10f98116f4c12350ca131363006f11aa267ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=80=9D=E6=B5=B7?= <1464576565@qq.com> Date: Mon, 28 Jul 2025 20:52:34 +0800 Subject: [PATCH] modify --- Editor/Helper/ExtensionHelper.cs | 2 +- Editor/Helper/GUILayoutHelper.cs | 2 +- Editor/Inspector/UIEffectWrapDrawer.cs | 2 +- Editor/Inspector/UXUIEditor.cs | 2 +- Editor/UX/UXImageEditor.cs | 13 ++++--------- Editor/UX/UXTextMeshProEditor.cs | 2 +- 6 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Editor/Helper/ExtensionHelper.cs b/Editor/Helper/ExtensionHelper.cs index d5f27f2..639d195 100644 --- a/Editor/Helper/ExtensionHelper.cs +++ b/Editor/Helper/ExtensionHelper.cs @@ -5,7 +5,7 @@ using UnityEngine; namespace AlicizaX.UI.Extension.Editor { - public static class ExtensionHelper + internal static class ExtensionHelper { public static void PreviewAudioClip(AudioClip clip) { diff --git a/Editor/Helper/GUILayoutHelper.cs b/Editor/Helper/GUILayoutHelper.cs index c3bda3f..d73c603 100644 --- a/Editor/Helper/GUILayoutHelper.cs +++ b/Editor/Helper/GUILayoutHelper.cs @@ -4,7 +4,7 @@ using UnityEngine; namespace AlicizaX.UI.Extension.Editor { - public class GUILayoutHelper + internal class GUILayoutHelper { public static void DrawProperty(SerializedProperty property, GUISkin skin, string content) { diff --git a/Editor/Inspector/UIEffectWrapDrawer.cs b/Editor/Inspector/UIEffectWrapDrawer.cs index 447d762..5afdb37 100644 --- a/Editor/Inspector/UIEffectWrapDrawer.cs +++ b/Editor/Inspector/UIEffectWrapDrawer.cs @@ -2,7 +2,7 @@ using UnityEditor; namespace UnityEngine.UI { - public static class UIEffectWrapDrawer + internal static class UIEffectWrapDrawer { static string LabelStr; static string ShadowStr; diff --git a/Editor/Inspector/UXUIEditor.cs b/Editor/Inspector/UXUIEditor.cs index a438a21..12ee068 100644 --- a/Editor/Inspector/UXUIEditor.cs +++ b/Editor/Inspector/UXUIEditor.cs @@ -6,7 +6,7 @@ using UnityEngine; using UnityEngine.UI; -public class UXUIEditor : Editor +internal class UXUIEditor : Editor { static object InvokeMethod(Type type, string methodName, object[] parameters = null) { diff --git a/Editor/UX/UXImageEditor.cs b/Editor/UX/UXImageEditor.cs index 4e549c7..3e52a78 100644 --- a/Editor/UX/UXImageEditor.cs +++ b/Editor/UX/UXImageEditor.cs @@ -11,7 +11,7 @@ namespace UnityEngine.UI { [CustomEditor(typeof(UXImage), true)] [CanEditMultipleObjects] - public class UXImageEditor : Editor + internal class UXImageEditor : Editor { private GameObject go; @@ -185,8 +185,6 @@ namespace UnityEngine.UI m_ShowSliced.valueChanged.AddListener(Repaint); m_ShowTiled.valueChanged.AddListener(Repaint); m_ShowFilled.valueChanged.AddListener(Repaint); - - } private void OnDisable() @@ -197,7 +195,6 @@ namespace UnityEngine.UI } - m_ShowType.valueChanged.RemoveListener(Repaint); m_ShowNativeSize.valueChanged.RemoveListener(Repaint); m_ShowSlicedOrTiled.valueChanged.RemoveListener(Repaint); @@ -288,12 +285,11 @@ namespace UnityEngine.UI protected void AppearanceControlsGUI() { EditorGUI.BeginChangeCheck(); - string[] labels = {"Solid_Color", "Gradient_Color" }; + string[] labels = { "Solid_Color", "Gradient_Color" }; var type = (UXImage.ColorType)EnumPopupLayoutEx("ColorType", typeof(UXImage.ColorType), m_ColorType.intValue, labels); // EditorGUILayout.EnumPopup(EditorLocalization.GetLocalization("UXImage", "m_ColorType"), (UXImage.ColorType)m_ColorType.intValue); if (EditorGUI.EndChangeCheck()) { - m_ColorType.intValue = (int)type; if ((int)type == 1 && m_Type.intValue != 0) { @@ -334,12 +330,11 @@ namespace UnityEngine.UI else if (type == UXImage.ColorType.Gradient_Color) { EditorGUI.BeginChangeCheck(); - string[] labels2 = {"Vertical", "Horizontal"}; + string[] labels2 = { "Vertical", "Horizontal" }; var direction = (UXImage.GradientDirection)EnumPopupLayoutEx("m_Direction", typeof(UXImage.GradientDirection), m_Direction.intValue, labels2); if (EditorGUI.EndChangeCheck()) { m_Direction.intValue = (int)direction; - } //EditorGUILayout.ColorField(m_Color); @@ -522,7 +517,7 @@ namespace UnityEngine.UI string[] labels = { "None", "Horizontal", - "Vertical", "FourCorner" + "Vertical", "FourCorner" }; EditorGUI.BeginChangeCheck(); m_FlipMode.intValue = EnumPopupLayoutEx(m_FlipModeContent.text, typeof(UXImage.FlipMode), m_FlipMode.intValue, labels); diff --git a/Editor/UX/UXTextMeshProEditor.cs b/Editor/UX/UXTextMeshProEditor.cs index 2101979..ed27e04 100644 --- a/Editor/UX/UXTextMeshProEditor.cs +++ b/Editor/UX/UXTextMeshProEditor.cs @@ -5,7 +5,7 @@ namespace UnityEngine.UI { [CustomEditor(typeof(UXTextMeshPro), true)] [CanEditMultipleObjects] - public class UXTextMeshProEditor : TMPro.EditorUtilities.TMP_EditorPanelUI + internal class UXTextMeshProEditor : TMPro.EditorUtilities.TMP_EditorPanelUI { private SerializedProperty text; private SerializedProperty localizationID;