From 18de448f43e9147d6da36c9557abef8c1aa256cb Mon Sep 17 00:00:00 2001 From: LiRuoChen <571244399@qq.com> Date: Wed, 24 Jun 2026 13:45:48 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/VisualForm/AnchorDock.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Runtime/VisualForm/AnchorDock.cs b/Runtime/VisualForm/AnchorDock.cs index 896c89b..411f1ae 100644 --- a/Runtime/VisualForm/AnchorDock.cs +++ b/Runtime/VisualForm/AnchorDock.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using XericLibrary.Runtime.MacroLibrary; -using XericLibraryEditor.Debug; using System; namespace XericUI.VisualForm @@ -858,8 +857,9 @@ namespace XericUI.VisualForm Vector2 center = pixelSafeZone.center; Vector3 size = new Vector3(pixelSafeZone.width, pixelSafeZone.height, 0.001f); - - canvas.DrawGizmosCanvasRect_Warn(pixelSafeZone); + + // ReSharper disable once InvokeAsExtensionMethod + XericLibraryEditor.Debug.MacroGizmosDraw.DrawGizmosCanvasRect_Warn(canvas, pixelSafeZone); } #endif -- 2.54.0 From 7d8ed6148d86a361189493c276d5dc068c2f4cc3 Mon Sep 17 00:00:00 2001 From: LiRuoChen <571244399@qq.com> Date: Wed, 24 Jun 2026 14:13:20 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=A1=A5=E5=85=A8=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E7=9A=84=E9=A2=84=E7=BC=96=E8=AF=91=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Core/Base/XericUIBehaciour.cs | 4 ++++ .../Core/Vessel/XericUIExtendHelper.Text.cs | 20 ++++++++++++++++--- Runtime/FlipPage/FlipPageComponentManager.cs | 1 - .../FlipPage/XericFlipPageIndexVesselBase.cs | 2 ++ .../Scripts/XuiavrPropertyScriptableObject.cs | 5 ++--- .../Scripts/XuiavrgLocator.cs | 5 ++++- .../XericHorizontalOrVerticalLayoutGroup.cs | 3 +++ 7 files changed, 32 insertions(+), 8 deletions(-) diff --git a/Runtime/Core/Base/XericUIBehaciour.cs b/Runtime/Core/Base/XericUIBehaciour.cs index 5423a16..84cc67a 100644 --- a/Runtime/Core/Base/XericUIBehaciour.cs +++ b/Runtime/Core/Base/XericUIBehaciour.cs @@ -1,5 +1,7 @@ using System; +#if ODIN_INSPECTOR using Sirenix.OdinInspector; +#endif using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; @@ -8,8 +10,10 @@ namespace XericUI.Core.Base { public class XericUIBehaciour : UIBehaviour { +#if ODIN_INSPECTOR [InfoBox("脚本必填属性存在空引用!请检查开放属性后再试", InfoMessageType.Error, VisibleIf = "PublicFieldNullReference")] [HideLabel, DisplayAsString] +#endif string __EMPTYFIELD; diff --git a/Runtime/Core/Vessel/XericUIExtendHelper.Text.cs b/Runtime/Core/Vessel/XericUIExtendHelper.Text.cs index 5849f0e..4ddd10e 100644 --- a/Runtime/Core/Vessel/XericUIExtendHelper.Text.cs +++ b/Runtime/Core/Vessel/XericUIExtendHelper.Text.cs @@ -12,16 +12,21 @@ namespace XericUI.Core.Text public static string DebugSelfName => ""; #region TMP_Text - + /// /// 获取文本容器中的字符串内容 /// /// /// public static string GetStringContext(this ObjectVessel obj) +#if dUI_TextMeshPro where T : TMP_Text => obj != null ? obj.Target.text : string.Empty; - +#else + where T : UnityEngine.UI.Text + => obj != null ? obj.Target.text : string.Empty; +#endif + /// /// 获取文本容器中的字符串内容 /// @@ -29,6 +34,7 @@ namespace XericUI.Core.Text /// /// public static void SetStringContext(this ObjectVessel obj, string value) +#if dUI_TextMeshPro where T : TMP_Text { if (obj != null) @@ -36,7 +42,15 @@ namespace XericUI.Core.Text else Debug.LogError($"正在向空{DebugSelfName}对象赋值"); } - +#else + where T : UnityEngine.UI.Text + { + if (obj != null) + obj.Target.text = value; + else + Debug.LogError($"正在向空{DebugSelfName}对象赋值"); + } +#endif #endregion } diff --git a/Runtime/FlipPage/FlipPageComponentManager.cs b/Runtime/FlipPage/FlipPageComponentManager.cs index 39f7335..0db2588 100644 --- a/Runtime/FlipPage/FlipPageComponentManager.cs +++ b/Runtime/FlipPage/FlipPageComponentManager.cs @@ -5,7 +5,6 @@ using System.ComponentModel; using System.Linq; using Deconstruction.Runtime.UI; using JetBrains.Annotations; -using Sirenix.OdinInspector; using TMPro; using UnityEngine; using UnityEngine.UI; diff --git a/Runtime/FlipPage/XericFlipPageIndexVesselBase.cs b/Runtime/FlipPage/XericFlipPageIndexVesselBase.cs index 50970cc..b521956 100644 --- a/Runtime/FlipPage/XericFlipPageIndexVesselBase.cs +++ b/Runtime/FlipPage/XericFlipPageIndexVesselBase.cs @@ -2,7 +2,9 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; +#if ODIN_INSPECTOR using Sirenix.OdinInspector; +#endif using UnityEngine; using UnityEngine.Pool; using UnityEngine.Serialization; diff --git a/Runtime/InterfaceAttributeReflectionGenerator/Scripts/XuiavrPropertyScriptableObject.cs b/Runtime/InterfaceAttributeReflectionGenerator/Scripts/XuiavrPropertyScriptableObject.cs index 2d806b9..4aae244 100644 --- a/Runtime/InterfaceAttributeReflectionGenerator/Scripts/XuiavrPropertyScriptableObject.cs +++ b/Runtime/InterfaceAttributeReflectionGenerator/Scripts/XuiavrPropertyScriptableObject.cs @@ -48,9 +48,7 @@ namespace XericUI.ReflectionUIGenerator } private System.Type _valueType; - /// - /// 属性类型名称枚举 - /// +#if ODIN_INSPECTOR // 属性类型名称枚举 private IEnumerable AssemblyValueTypeNames { get @@ -75,6 +73,7 @@ namespace XericUI.ReflectionUIGenerator } } private static ValueDropdownList _assemblyValueTypeName = null; +#endif /// /// 直接定义所有需要检查的类型 diff --git a/Runtime/InterfaceAttributeReflectionGenerator/Scripts/XuiavrgLocator.cs b/Runtime/InterfaceAttributeReflectionGenerator/Scripts/XuiavrgLocator.cs index b4f1b7b..712baca 100644 --- a/Runtime/InterfaceAttributeReflectionGenerator/Scripts/XuiavrgLocator.cs +++ b/Runtime/InterfaceAttributeReflectionGenerator/Scripts/XuiavrgLocator.cs @@ -1,7 +1,9 @@ using System; using System.Collections; using System.Collections.Generic; +#if ODIN_INSPECTOR using Sirenix.OdinInspector; +#endif using UnityEngine; using UnityEngine.Serialization; @@ -273,6 +275,7 @@ namespace XericUI.ReflectionUIGenerator /// public void ClearTriggerEvent() { +#if dUI_TextMeshPro if (TMPInputField) { TMPInputField.onEndEdit.RemoveAllListeners(); @@ -284,7 +287,7 @@ namespace XericUI.ReflectionUIGenerator TMPInputField.onValueChanged.RemoveAllListeners(); TMPInputField.onTouchScreenKeyboardStatusChanged.RemoveAllListeners(); } - +#endif if (UIInputField) { UIInputField.onEndEdit.RemoveAllListeners(); diff --git a/Runtime/OverrideLayout/XericHorizontalOrVerticalLayoutGroup.cs b/Runtime/OverrideLayout/XericHorizontalOrVerticalLayoutGroup.cs index 0bb5fc0..b8519ab 100644 --- a/Runtime/OverrideLayout/XericHorizontalOrVerticalLayoutGroup.cs +++ b/Runtime/OverrideLayout/XericHorizontalOrVerticalLayoutGroup.cs @@ -1,9 +1,12 @@ using System.Collections.Generic; +#if ODIN_INSPECTOR using Sirenix.OdinInspector; using Sirenix.Utilities; +#endif using UnityEngine; using UnityEngine.Pool; using UnityEngine.UI; +using XericLibrary.Runtime.MacroLibrary; namespace XericUI.OverrideLayout { -- 2.54.0 From 3fc41c006a0c77f4a7513a5bc55211fc506da9fc Mon Sep 17 00:00:00 2001 From: LiRuoChen <571244399@qq.com> Date: Wed, 24 Jun 2026 15:10:21 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/FlipPage/FlipPageComponentManager.cs | 3 +++ .../OverrideLayout/XericHorizontalOrVerticalLayoutGroup.cs | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Runtime/FlipPage/FlipPageComponentManager.cs b/Runtime/FlipPage/FlipPageComponentManager.cs index 0db2588..1897e71 100644 --- a/Runtime/FlipPage/FlipPageComponentManager.cs +++ b/Runtime/FlipPage/FlipPageComponentManager.cs @@ -5,6 +5,9 @@ using System.ComponentModel; using System.Linq; using Deconstruction.Runtime.UI; using JetBrains.Annotations; +#if ODIN_INSPECTOR +using Sirenix.OdinInspector; +#endif using TMPro; using UnityEngine; using UnityEngine.UI; diff --git a/Runtime/OverrideLayout/XericHorizontalOrVerticalLayoutGroup.cs b/Runtime/OverrideLayout/XericHorizontalOrVerticalLayoutGroup.cs index b8519ab..f3b2b45 100644 --- a/Runtime/OverrideLayout/XericHorizontalOrVerticalLayoutGroup.cs +++ b/Runtime/OverrideLayout/XericHorizontalOrVerticalLayoutGroup.cs @@ -1,8 +1,4 @@ using System.Collections.Generic; -#if ODIN_INSPECTOR -using Sirenix.OdinInspector; -using Sirenix.Utilities; -#endif using UnityEngine; using UnityEngine.Pool; using UnityEngine.UI; -- 2.54.0