diff --git a/Editor/XTable/XTableEditorOverlay.cs b/Editor/XTable/XTableEditorOverlay.cs index 99a378d..4c29b41 100644 --- a/Editor/XTable/XTableEditorOverlay.cs +++ b/Editor/XTable/XTableEditorOverlay.cs @@ -5,6 +5,7 @@ using UnityEditor; using UnityEngine; using XericLibrary.Runtime.MacroLibrary; using XericUI.XTable.Rendering.Component; +using XericUI.Core; namespace XericUIEditor.XTable { @@ -17,7 +18,7 @@ namespace XericUIEditor.XTable /// 是否启用覆盖层(可通过菜单开关) private static bool s_Enabled = true; - internal const string MENU_PATH = "XericLibrary/UI/Table/Table Editor Override Layer"; + internal const string MENU_PATH = XericRegistrationPaths.Table + "/Table Editor Override Layer"; [MenuItem(MENU_PATH, false, 200)] private static void ToggleOverlay() diff --git a/Editor/XTable/XericUIActionTableEditor.cs b/Editor/XTable/XericUIActionTableEditor.cs index 4027a03..6767e6b 100644 --- a/Editor/XTable/XericUIActionTableEditor.cs +++ b/Editor/XTable/XericUIActionTableEditor.cs @@ -5,6 +5,7 @@ using XericLibrary.Runtime.MacroLibrary; using XericLibrary.Runtime.SuperStyleSheet; using XericUI.XTable.Core; using XericUI.XTable.Rendering.Component; +using XericUI.Core; namespace XericUIEditor.XTable { @@ -28,7 +29,7 @@ namespace XericUIEditor.XTable private SerializedProperty m_SelectionAutoScrollMaxSpeedProp; private SerializedProperty m_SelectionAutoScrollAccelerationProp; - internal const string MENU_PATH = "GameObject/Xeric Library/Table/Xeric UI Action Table"; + internal const string MENU_PATH = XericRegistrationPaths.TableCreate + "/Xeric UI Action Table"; // 折叠状态 private static bool s_StyleFoldout = true; diff --git a/Editor/XuiavrgExampleMenu.cs b/Editor/XuiavrgExampleMenu.cs index 5c1eae6..146b0d8 100644 --- a/Editor/XuiavrgExampleMenu.cs +++ b/Editor/XuiavrgExampleMenu.cs @@ -2,6 +2,7 @@ using UnityEditor; using UnityEngine; using UnityEngine.UI; using XericUI.ReflectionUIGenerator; +using XericUI.Core; namespace XericUIEditor.ReflectionUIGenerator { @@ -16,7 +17,7 @@ namespace XericUIEditor.ReflectionUIGenerator /// public static class XuiavrgExampleMenu { - private const string MenuPath = "GameObject/Xeric UI/Create Reflection UI Example"; + private const string MenuPath = XericRegistrationPaths.UICreate + "/Create Reflection UI Example"; private const int MenuPriority = 10; [MenuItem(MenuPath, false, MenuPriority)] diff --git a/Runtime/BubbleLayout/BoundaryConstraint.cs b/Runtime/BubbleLayout/BoundaryConstraint.cs index f7ace6e..46cc05e 100644 --- a/Runtime/BubbleLayout/BoundaryConstraint.cs +++ b/Runtime/BubbleLayout/BoundaryConstraint.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using UnityEngine; +using XericUI.Core; namespace XericUI.BubbleLayout { @@ -19,7 +20,7 @@ namespace XericUI.BubbleLayout /// 边界限制约束插件 —— 将气泡元素限制在指定范围内。 /// 支持矩形/椭圆两种形状,并记录超出范围的元素。 /// - [AddComponentMenu("Xeric UI Vessel/Layout/Boundary Constraint", 56)] + [AddComponentMenu(XericRegistrationPaths.Layout + "/Boundary Constraint", 56)] public class BoundaryConstraint : BubbleLayoutPluginBase, IBubbleConstraintPlugin { [Header("限制范围")] diff --git a/Runtime/BubbleLayout/BubbleCollisionConstraint.cs b/Runtime/BubbleLayout/BubbleCollisionConstraint.cs index 674a867..c82458b 100644 --- a/Runtime/BubbleLayout/BubbleCollisionConstraint.cs +++ b/Runtime/BubbleLayout/BubbleCollisionConstraint.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using UnityEngine; using XericLibrary.Runtime; +using XericUI.Core; namespace XericUI.BubbleLayout { @@ -8,7 +9,7 @@ namespace XericUI.BubbleLayout /// 气泡碰撞约束插件 —— 使用四叉树检测重叠并推挤分离。 /// 默认 Order = 1000,在约束阶段最后执行,确保碰撞排挤在所有其他约束之后进行。 /// - [AddComponentMenu("Xeric UI Vessel/Layout/Bubble Collision Constraint", 52)] + [AddComponentMenu(XericRegistrationPaths.Layout + "/Bubble Collision Constraint", 52)] public class BubbleCollisionConstraint : BubbleLayoutPluginBase, IBubbleConstraintPlugin { #if UNITY_EDITOR diff --git a/Runtime/BubbleLayout/BubbleLayoutGroup.cs b/Runtime/BubbleLayout/BubbleLayoutGroup.cs index 8f8f677..33f1640 100644 --- a/Runtime/BubbleLayout/BubbleLayoutGroup.cs +++ b/Runtime/BubbleLayout/BubbleLayoutGroup.cs @@ -4,6 +4,10 @@ using UnityEngine; using UnityEngine.Pool; using UnityEngine.UI; using XericLibrary.Runtime; +// using 必须在守卫**外**:下面 [AddComponentMenu(XericRegistrationPaths.Layout + …)] 的 +// 参数在玩家编译也要算得出常量——它在 #if UNITY_EDITOR 里的话,编辑器那套照样绿、 +// 只有玩家编译报 CS0103(2026-10-23 现场) +using XericUI.Core; #if UNITY_EDITOR using System.Diagnostics; #endif @@ -56,7 +60,7 @@ namespace XericUI.BubbleLayout /// 支持动画插件和约束插件,插件按 Order 优先级分阶段顺序执行。 /// [ExecuteAlways] - [AddComponentMenu("Xeric UI Vessel/Layout/Bubble Layout Group", 51)] + [AddComponentMenu(XericRegistrationPaths.Layout + "/Bubble Layout Group", 51)] public class BubbleLayoutGroup : LayoutGroup { #region 序列化字段 diff --git a/Runtime/BubbleLayout/CircularLayoutConstraint.cs b/Runtime/BubbleLayout/CircularLayoutConstraint.cs index a3ca5b7..40fd573 100644 --- a/Runtime/BubbleLayout/CircularLayoutConstraint.cs +++ b/Runtime/BubbleLayout/CircularLayoutConstraint.cs @@ -1,13 +1,14 @@ using System; using System.Collections.Generic; using UnityEngine; +using XericUI.Core; namespace XericUI.BubbleLayout { /// /// 环绕布局约束插件 —— 将气泡元素沿圆形排列,并通过弹簧力吸附到目标位置。 /// - [AddComponentMenu("Xeric UI Vessel/Layout/Circular Layout Constraint", 55)] + [AddComponentMenu(XericRegistrationPaths.Layout + "/Circular Layout Constraint", 55)] public class CircularLayoutConstraint : BubbleLayoutPluginBase, IBubbleConstraintPlugin { [Header("吸附力")] diff --git a/Runtime/BubbleLayout/HorizontalLayoutConstraint.cs b/Runtime/BubbleLayout/HorizontalLayoutConstraint.cs index 2cb8149..5ca63c0 100644 --- a/Runtime/BubbleLayout/HorizontalLayoutConstraint.cs +++ b/Runtime/BubbleLayout/HorizontalLayoutConstraint.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using UnityEngine; +using XericUI.Core; namespace XericUI.BubbleLayout { @@ -7,7 +8,7 @@ namespace XericUI.BubbleLayout /// 横排布局约束插件 —— 将气泡元素沿 X 轴排列,并通过弹簧力吸附到目标位置。 /// 支持多布局框穿插排列。 /// - [AddComponentMenu("Xeric UI Vessel/Layout/Horizontal Layout Constraint", 54)] + [AddComponentMenu(XericRegistrationPaths.Layout + "/Horizontal Layout Constraint", 54)] public class HorizontalLayoutConstraint : LinearLayoutConstraintBase { [Header("横排特有")] diff --git a/Runtime/BubbleLayout/VerticalLayoutConstraint.cs b/Runtime/BubbleLayout/VerticalLayoutConstraint.cs index 645f40e..18e1ba9 100644 --- a/Runtime/BubbleLayout/VerticalLayoutConstraint.cs +++ b/Runtime/BubbleLayout/VerticalLayoutConstraint.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using UnityEngine; +using XericUI.Core; namespace XericUI.BubbleLayout { @@ -25,7 +26,7 @@ namespace XericUI.BubbleLayout /// 竖排布局约束插件 —— 将气泡元素沿 Y 轴排列,并通过弹簧力吸附到目标位置。 /// 支持多布局框穿插排列和拉链模式(一左一右交替)。 /// - [AddComponentMenu("Xeric UI Vessel/Layout/Vertical Layout Constraint", 53)] + [AddComponentMenu(XericRegistrationPaths.Layout + "/Vertical Layout Constraint", 53)] public class VerticalLayoutConstraint : LinearLayoutConstraintBase { [Header("竖排特有")] diff --git a/Runtime/FlipPage/FlipPageComponentManager.cs b/Runtime/FlipPage/FlipPageComponentManager.cs index 4b28f38..dbbacee 100644 --- a/Runtime/FlipPage/FlipPageComponentManager.cs +++ b/Runtime/FlipPage/FlipPageComponentManager.cs @@ -14,6 +14,7 @@ using UnityEngine.UI; using XericLibrary.Runtime.MacroLibrary; using XericUI.Core.Vessel; using Component = UnityEngine.Component; +using XericUI.Core; namespace XericUI.FlipPage { @@ -32,7 +33,7 @@ namespace XericUI.FlipPage /// 两侧是固定的按钮,中间是一个横向的排列容器,在指定了按钮对象池后,将会自动生成绑定好的按钮用于翻页。 /// 页数按钮需要让button在预制体最外层,它的子集中需要包含一个TMP_Text。 /// - [AddComponentMenu("Xeric UI Vessel/FlipPage/Basic FilpPage Manager")] + [AddComponentMenu(XericRegistrationPaths.FlipPage + "/Basic FilpPage Manager")] public class FlipPageComponentManager : XericFlipPageIndexVesselBase { #region 界面属性 diff --git a/Runtime/FlipPage/GeneralDataFlipPage.cs b/Runtime/FlipPage/GeneralDataFlipPage.cs index b04697c..2c9db40 100644 --- a/Runtime/FlipPage/GeneralDataFlipPage.cs +++ b/Runtime/FlipPage/GeneralDataFlipPage.cs @@ -1,13 +1,14 @@ using System; using UnityEngine; using UnityEngine.Pool; +using XericUI.Core; namespace XericUI.FlipPage { /// /// 翻页组件管理器(通用数据层) /// - [AddComponentMenu("Xeric UI Vessel/FlipPage/General FilpPage Manager")] + [AddComponentMenu(XericRegistrationPaths.FlipPage + "/General FilpPage Manager")] public class GeneralDataFlipPage : FlipPageComponentManager { diff --git a/Runtime/FlipPage/XericFlipPageIndexVesselBase.cs b/Runtime/FlipPage/XericFlipPageIndexVesselBase.cs index a3ac416..2a1fa4e 100644 --- a/Runtime/FlipPage/XericFlipPageIndexVesselBase.cs +++ b/Runtime/FlipPage/XericFlipPageIndexVesselBase.cs @@ -12,6 +12,7 @@ using UnityEngine.UI; using XericLibrary.Runtime.MacroLibrary; using XericUI.Core.Base; using XericUI.Core.Vessel; +using XericUI.Core; namespace XericUI.FlipPage { @@ -35,7 +36,7 @@ namespace XericUI.FlipPage /// currentPageIndex¿ÉÒԻñȡµ±ǰҳÊý£¬Currentpage»ñȡµ±ǰҳÃæÊý¾ݣ» /// ÔÚҳÃæÊý¾ÝÖÐpageNumber¿ÉÒԻñȡ×ԼºËùÔڵÄҳÊý£¬itemInfos»ñȡҳÃæÖеÄËùÓÐÊý¾ÝÏîĿ¡£ /// - [AddComponentMenu("Xeric UI Vessel/FlipPage/Basic FilpPage Database")] + [AddComponentMenu(XericRegistrationPaths.FlipPage + "/Basic FilpPage Database")] public class XericFlipPageIndexVesselBase : XericUIBehaviour { #region É趨²ÎÊý diff --git a/Runtime/Form/Controllers/UIFormController.cs b/Runtime/Form/Controllers/UIFormController.cs index f5f00d2..1752008 100644 --- a/Runtime/Form/Controllers/UIFormController.cs +++ b/Runtime/Form/Controllers/UIFormController.cs @@ -2,6 +2,7 @@ using System.Collections; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; +using XericUI.Core; namespace XericUI.Form { @@ -32,7 +33,7 @@ namespace XericUI.Form /// 支持全屏/还原、边缘吸附、自动隐藏、拖拽移动、置顶。 /// 通过 WindowEntry 与 Manager 通信。 /// - [AddComponentMenu("Xeric UI Vessel/Form/UI Form Controller")] + [AddComponentMenu(XericRegistrationPaths.Form + "/UI Form Controller")] [RequireComponent(typeof(RectTransform))] public class UIFormController : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler, IPointerDownHandler { diff --git a/Runtime/Form/Controllers/UITitleBar.cs b/Runtime/Form/Controllers/UITitleBar.cs index e054aea..ef8a82d 100644 --- a/Runtime/Form/Controllers/UITitleBar.cs +++ b/Runtime/Form/Controllers/UITitleBar.cs @@ -7,6 +7,7 @@ using UI_Text = UnityEngine.UI.Text; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; +using XericUI.Core; namespace XericUI.Form { @@ -14,7 +15,7 @@ namespace XericUI.Form /// 窗口标题栏 — 独立子组件,挂载在 UIFormController 的子对象上。 /// Start 时向上查找父级 UIFormController,绑定按钮/Toggle 事件到其公开 API。 /// - [AddComponentMenu("Xeric UI Vessel/Form/UI Title Bar")] + [AddComponentMenu(XericRegistrationPaths.Form + "/UI Title Bar")] public class UITitleBar : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler { [Header("控件引用")] diff --git a/Runtime/Form/UIFormManager.cs b/Runtime/Form/UIFormManager.cs index 8e19af0..5f211e1 100644 --- a/Runtime/Form/UIFormManager.cs +++ b/Runtime/Form/UIFormManager.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using UnityEngine; +using XericUI.Core; namespace XericUI.Form { @@ -8,7 +9,7 @@ namespace XericUI.Form /// 通过 Entry 驱动管理窗口生命周期、层级排序、委托事件发布。 /// 支持任务栏和边缘触发隐藏窗口。 /// - [AddComponentMenu("Xeric UI Vessel/Form/UI Form Manager")] + [AddComponentMenu(XericRegistrationPaths.Form + "/UI Form Manager")] [DefaultExecutionOrder(32000)] public class UIFormManager : MonoBehaviour { diff --git a/Runtime/InterfaceAttributeReflectionGenerator/Scripts/AvrgMvvmResolverConfig.cs b/Runtime/InterfaceAttributeReflectionGenerator/Scripts/AvrgMvvmResolverConfig.cs index cf6dca5..e139b8e 100644 --- a/Runtime/InterfaceAttributeReflectionGenerator/Scripts/AvrgMvvmResolverConfig.cs +++ b/Runtime/InterfaceAttributeReflectionGenerator/Scripts/AvrgMvvmResolverConfig.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using UnityEngine; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { @@ -10,7 +11,7 @@ namespace XericUI.ReflectionUIGenerator /// [CreateAssetMenu( fileName = "Xeric UI avr Resolver Config", - menuName = "Xeric Library/UI Action Vessel/Reflection UI Gen/UI avr Resolver Config", + menuName = XericRegistrationPaths.UI + "/Reflection UI Gen/UI avr Resolver Config", order = 20)] public class AvrgMvvmResolverConfig : ScriptableObject, IAvrgMvvmConflictResolver { diff --git a/Runtime/InterfaceAttributeReflectionGenerator/Scripts/AvrgTypePrefabMappingConfig.cs b/Runtime/InterfaceAttributeReflectionGenerator/Scripts/AvrgTypePrefabMappingConfig.cs index 64cc894..cb00c76 100644 --- a/Runtime/InterfaceAttributeReflectionGenerator/Scripts/AvrgTypePrefabMappingConfig.cs +++ b/Runtime/InterfaceAttributeReflectionGenerator/Scripts/AvrgTypePrefabMappingConfig.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using UnityEngine; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { @@ -10,7 +11,7 @@ namespace XericUI.ReflectionUIGenerator /// [CreateAssetMenu( fileName = "Xeric UI avr Type-Prefab Mapping", - menuName = "Xeric Library/UI Action Vessel/Reflection UI Gen/UI avr Type-Prefab Mapping", + menuName = XericRegistrationPaths.UI + "/Reflection UI Gen/UI avr Type-Prefab Mapping", order = 15)] public class AvrgTypePrefabMappingConfig : ScriptableObject { diff --git a/Runtime/InterfaceAttributeReflectionGenerator/Scripts/AvrgValueRangeConfig.cs b/Runtime/InterfaceAttributeReflectionGenerator/Scripts/AvrgValueRangeConfig.cs index 04083c6..b34aef5 100644 --- a/Runtime/InterfaceAttributeReflectionGenerator/Scripts/AvrgValueRangeConfig.cs +++ b/Runtime/InterfaceAttributeReflectionGenerator/Scripts/AvrgValueRangeConfig.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using UnityEngine; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { @@ -10,7 +11,7 @@ namespace XericUI.ReflectionUIGenerator /// [CreateAssetMenu( fileName = "Xeric UI avr Value Range Config", - menuName = "Xeric Library/UI Action Vessel/Reflection UI Gen/UI avr Value Range Config", + menuName = XericRegistrationPaths.UI + "/Reflection UI Gen/UI avr Value Range Config", order = 25)] public class AvrgValueRangeConfig : ScriptableObject { diff --git a/Runtime/OverrideLayout/XericHorizontalLayoutGroup.cs b/Runtime/OverrideLayout/XericHorizontalLayoutGroup.cs index 48ce478..b437e97 100644 --- a/Runtime/OverrideLayout/XericHorizontalLayoutGroup.cs +++ b/Runtime/OverrideLayout/XericHorizontalLayoutGroup.cs @@ -4,10 +4,11 @@ using UnityEngine; using UnityEngine.Pool; using UnityEngine.UI; using XericLibrary.Runtime.MacroLibrary; +using XericUI.Core; namespace XericUI.OverrideLayout { - [AddComponentMenu("Xeric UI Vessel/Layout/Xeric Horizontal Layout Group", 10)] + [AddComponentMenu(XericRegistrationPaths.Layout + "/Xeric Horizontal Layout Group", 10)] /// /// Layout child layout elements below each other. /// diff --git a/Runtime/OverrideLayout/XericScrollRect.cs b/Runtime/OverrideLayout/XericScrollRect.cs index 9f40aaf..fa71007 100644 --- a/Runtime/OverrideLayout/XericScrollRect.cs +++ b/Runtime/OverrideLayout/XericScrollRect.cs @@ -16,11 +16,12 @@ using XericLibraryEditor.Debug; #endif #if ODIN_INSPECTOR using Sirenix.OdinInspector; +using XericUI.Core; #endif namespace XericUI.OverrideLayout { - [AddComponentMenu("Xeric UI Vessel/UI/ScrollRect", 50)] + [AddComponentMenu(XericRegistrationPaths.UI + "/ScrollRect", 50)] [SelectionBase] [ExecuteAlways] [DisallowMultipleComponent] @@ -590,11 +591,11 @@ namespace XericUI.OverrideLayout #region 组件替换 #if UNITY_EDITOR - [UnityEditor.MenuItem("CONTEXT/ScrollRect/Replace To XericScrollView", true)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ScrollRect/Replace To XericScrollView", true)] private static bool ValidateReplaceToXeric(UnityEditor.MenuCommand command) => command.context is ScrollRect and not XericScrollRect; - [UnityEditor.MenuItem("CONTEXT/ScrollRect/Replace To XericScrollView", false, 10)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ScrollRect/Replace To XericScrollView", false, 10)] private static void ReplaceToXeric(UnityEditor.MenuCommand command) => command.ReplaceCommandContext( @@ -608,11 +609,11 @@ namespace XericUI.OverrideLayout t.verticalScrollbar = d.VScrollbar; }); - [UnityEditor.MenuItem("CONTEXT/ScrollRect/Replace To ScrollView", true)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ScrollRect/Replace To ScrollView", true)] private static bool ValidateReplaceToUnity(UnityEditor.MenuCommand command) => command.context is XericScrollRect; - [UnityEditor.MenuItem("CONTEXT/ScrollRect/Replace To ScrollView", false, 10)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ScrollRect/Replace To ScrollView", false, 10)] private static void ReplaceToUnity(UnityEditor.MenuCommand command) => command.ReplaceCommandContext( diff --git a/Runtime/OverrideLayout/XericVerticalLayoutGroup.cs b/Runtime/OverrideLayout/XericVerticalLayoutGroup.cs index 56d9f44..2598fb2 100644 --- a/Runtime/OverrideLayout/XericVerticalLayoutGroup.cs +++ b/Runtime/OverrideLayout/XericVerticalLayoutGroup.cs @@ -4,10 +4,11 @@ using UnityEngine; using UnityEngine.Pool; using UnityEngine.UI; using XericLibrary.Runtime.MacroLibrary; +using XericUI.Core; namespace XericUI.OverrideLayout { - [AddComponentMenu("Xeric UI Vessel/Layout/Xeric Vertical Layout Group", 10)] + [AddComponentMenu(XericRegistrationPaths.Layout + "/Xeric Vertical Layout Group", 10)] /// /// Layout child layout elements below each other. /// diff --git a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDColorValue.cs b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDColorValue.cs index d857e9c..3138618 100644 --- a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDColorValue.cs +++ b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDColorValue.cs @@ -1,12 +1,13 @@ using UnityEngine; using UnityEngine.UI; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { /// /// Color 值组件 — 通过 Image 显示颜色,可选点击弹出颜色选择器 /// - [AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDColorValue")] + [AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDColorValue")] public class XUIAvrgMDColorValue : XUIAvrgMDValue { [SerializeField, Tooltip("关联的 Image 组件(未设置则自动查找)")] diff --git a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDDropdownValue.cs b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDDropdownValue.cs index 05344ef..dad9f28 100644 --- a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDDropdownValue.cs +++ b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDDropdownValue.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System; using System.Linq; using UnityEngine; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { @@ -12,7 +13,7 @@ namespace XericUI.ReflectionUIGenerator /// 选项动态创建:OnPoolGet 时根据元数据 PresetOptions 构建选项列表, /// BindToAccessor 时通过 AddOptions() 填充到 Dropdown 组件。 /// - [AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDDropdownValue")] + [AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDDropdownValue")] public class XUIAvrgMDDropdownValue : XUIAvrgMDValue { [SerializeField, Tooltip("关联的 Dropdown 组件(未设置则自动查找)")] diff --git a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDInputFieldValue.cs b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDInputFieldValue.cs index 5cf2ef4..f3bc283 100644 --- a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDInputFieldValue.cs +++ b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDInputFieldValue.cs @@ -1,13 +1,14 @@ using System; using UnityEngine; using UnityEngine.UI; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { /// /// InputField 值组件 — 处理 string / float / int / double 类型的文本输入交互 /// - [AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDInputFieldValue")] + [AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDInputFieldValue")] public class XUIAvrgMDInputFieldValue : XUIAvrgMDValue { [SerializeField] diff --git a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDLabelValue.cs b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDLabelValue.cs index 46e3a9d..1dfd0f1 100644 --- a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDLabelValue.cs +++ b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDLabelValue.cs @@ -1,4 +1,5 @@ using UnityEngine; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { @@ -6,7 +7,7 @@ namespace XericUI.ReflectionUIGenerator /// Label 只读值组件 — 纯文本展示,无交互控件 /// 拥有自己的 _valueDisplayText 用于显示值 /// - [AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDLabelValue")] + [AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDLabelValue")] public class XUIAvrgMDLabelValue : XUIAvrgMDValue { [SerializeField, Tooltip("值显示文本 — 显示当前字段的值")] diff --git a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDSliderValue.cs b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDSliderValue.cs index ab48756..09c33e3 100644 --- a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDSliderValue.cs +++ b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDSliderValue.cs @@ -1,6 +1,7 @@ using System; using UnityEngine; using UnityEngine.UI; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { @@ -8,7 +9,7 @@ namespace XericUI.ReflectionUIGenerator /// Slider 值组件 — 处理 float / int / double 类型的滑块交互 /// 适用 Shader Range 属性或标记了 [XuiavrgFieldTag(Slider)] 的字段 /// - [AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDSliderValue")] + [AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDSliderValue")] public class XUIAvrgMDSliderValue : XUIAvrgMDValue { [SerializeField, Tooltip("关联的 Slider 组件(未设置则自动查找)")] diff --git a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDTextureValue.cs b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDTextureValue.cs index ed4c08e..cc7b428 100644 --- a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDTextureValue.cs +++ b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDTextureValue.cs @@ -1,12 +1,13 @@ using UnityEngine; using UnityEngine.UI; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { /// /// Texture 值组件 — 通过 RawImage 显示纹理 /// - [AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDTextureValue")] + [AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDTextureValue")] public class XUIAvrgMDTextureValue : XUIAvrgMDValue { [SerializeField, Tooltip("关联的 RawImage 组件(未设置则自动查找)")] diff --git a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDToggleGroupValue.cs b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDToggleGroupValue.cs index e19078e..cdc1e5c 100644 --- a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDToggleGroupValue.cs +++ b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDToggleGroupValue.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using UnityEngine; using UnityEngine.UI; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { @@ -12,7 +13,7 @@ namespace XericUI.ReflectionUIGenerator /// 选项动态创建:OnPoolGet 时根据元数据 PresetOptions 数量, /// 从 _toggleItemPrefab 实例化 Toggle 子对象。 /// - [AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDToggleGroupValue")] + [AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDToggleGroupValue")] public class XUIAvrgMDToggleGroupValue : XUIAvrgMDValue { [SerializeField, Tooltip("关联的 ToggleGroup 组件(未设置则自动查找)")] diff --git a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDToggleValue.cs b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDToggleValue.cs index ee63b89..0c0e91d 100644 --- a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDToggleValue.cs +++ b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDToggleValue.cs @@ -1,12 +1,13 @@ using UnityEngine; using UnityEngine.UI; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { /// /// Toggle 值组件 — 处理 bool 类型的开关交互 /// - [AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDToggleValue")] + [AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDToggleValue")] public class XUIAvrgMDToggleValue : XUIAvrgMDValue { [SerializeField, Tooltip("关联的 Toggle 组件(未设置则自动查找)")] diff --git a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDValue.cs b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDValue.cs index f8cc5c9..a335bad 100644 --- a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDValue.cs +++ b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDValue.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Text; using UnityEngine; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { @@ -16,7 +17,7 @@ namespace XericUI.ReflectionUIGenerator /// 6. 基类统一管理标签文本(名称 + 只读 + 警告标记)和单位可见性 /// 值显示由各子类自行实现 /// - [AddComponentMenu("Xeric Library/UI Action Vessel/XUIAvrgMDValue")] + [AddComponentMenu(XericRegistrationPaths.UI + "/XUIAvrgMDValue")] public class XUIAvrgMDValue : MonoBehaviour { /// diff --git a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDVectorValue.cs b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDVectorValue.cs index bf9188f..2b8d47a 100644 --- a/Runtime/OverrideUI/AvrgValues/XUIAvrgMDVectorValue.cs +++ b/Runtime/OverrideUI/AvrgValues/XUIAvrgMDVectorValue.cs @@ -1,5 +1,6 @@ using UnityEngine; using UnityEngine.UI; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { @@ -7,7 +8,7 @@ namespace XericUI.ReflectionUIGenerator /// 向量值组件 — 处理 Vector2 / Vector3 / Vector4 类型的多字段输入 /// 子节点按 BindingSlots 绑定各分量(如 "x", "y", "z", "w") /// - [AddComponentMenu("Xeric Library/UI Action Vessel/Values/XUIAvrgMDVectorValue")] + [AddComponentMenu(XericRegistrationPaths.UI + "/Values/XUIAvrgMDVectorValue")] public class XUIAvrgMDVectorValue : XUIAvrgMDValue { [SerializeField, Tooltip("X 分量 InputField(可选,也可通过 BindingSlots 的子节点绑定)")] diff --git a/Runtime/OverrideUI/AvrgValues/XuiAvrgMDGroup.cs b/Runtime/OverrideUI/AvrgValues/XuiAvrgMDGroup.cs index 7919946..25f1934 100644 --- a/Runtime/OverrideUI/AvrgValues/XuiAvrgMDGroup.cs +++ b/Runtime/OverrideUI/AvrgValues/XuiAvrgMDGroup.cs @@ -1,4 +1,5 @@ using UnityEngine; +using XericUI.Core; namespace XericUI.ReflectionUIGenerator { @@ -10,7 +11,7 @@ namespace XericUI.ReflectionUIGenerator /// 内部子元素通过锚点系统获得布局 /// 可通过挂载 TMP_Text / Image 等组件实现组标题/背景装饰 /// - [AddComponentMenu("Xeric Library/UI Action Vessel/XuiAvrgMDGroup")] + [AddComponentMenu(XericRegistrationPaths.UI + "/XuiAvrgMDGroup")] public class XuiAvrgMDGroup : MonoBehaviour { [SerializeField] diff --git a/Runtime/OverrideUI/XericButton.cs b/Runtime/OverrideUI/XericButton.cs index a65633b..8a35065 100644 --- a/Runtime/OverrideUI/XericButton.cs +++ b/Runtime/OverrideUI/XericButton.cs @@ -2,10 +2,11 @@ using TMPro; using UnityEngine; using UnityEngine.UI; using XericUI.Helper; +using XericUI.Core; namespace XericUI.OverrideUI { - [AddComponentMenu("Xeric UI Vessel/UI/Button", 50)] + [AddComponentMenu(XericRegistrationPaths.UI + "/Button", 50)] public class XericButton : Button { @@ -168,11 +169,11 @@ namespace XericUI.OverrideUI #region 组件替换 #if UNITY_EDITOR - [UnityEditor.MenuItem("CONTEXT/Button/Replace To/Xeric Button", true)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Xeric Button", true)] private static bool ValidateReplaceToXeric(UnityEditor.MenuCommand command) => command.context is Button and not XericButton; - [UnityEditor.MenuItem("CONTEXT/Button/Replace To/Xeric Button", false, 10)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Xeric Button", false, 10)] private static void ReplaceToXeric(UnityEditor.MenuCommand command) => command.ReplaceCommandContext( @@ -184,11 +185,11 @@ namespace XericUI.OverrideUI t.onClick = d.onClick; }); - [UnityEditor.MenuItem("CONTEXT/Button/Replace To/Unity Button (Native)", true)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Unity Button (Native)", true)] private static bool ValidateReplaceToUnity(UnityEditor.MenuCommand command) => command.context is XericButton; - [UnityEditor.MenuItem("CONTEXT/Button/Replace To/Unity Button (Native)", false, 100)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Unity Button (Native)", false, 100)] private static void ReplaceToUnity(UnityEditor.MenuCommand command) => command.ReplaceCommandContext( diff --git a/Runtime/OverrideUI/XericStyleButton.cs b/Runtime/OverrideUI/XericStyleButton.cs index d3a9bcb..c967dc9 100644 --- a/Runtime/OverrideUI/XericStyleButton.cs +++ b/Runtime/OverrideUI/XericStyleButton.cs @@ -4,6 +4,7 @@ using UnityEngine.UI; using XericLibrary.Runtime.SuperStyleSheet; using XericUI.Core.StyleSheetUI; using XericUI.Helper; +using XericUI.Core; namespace XericUI.OverrideUI { @@ -12,7 +13,7 @@ namespace XericUI.OverrideUI /// 通过 TransitionMode 选择颜色切换、纹理切换或两者并用, /// 替代 Unity 内置的 ColorBlock 和 SpriteState。 /// - [AddComponentMenu("Xeric UI Vessel/UI/Style Button", 51)] + [AddComponentMenu(XericRegistrationPaths.UI + "/Style Button", 51)] public class XericStyleButton : Button, IStyleRefreshable { /// 样式过渡模式 @@ -176,17 +177,17 @@ namespace XericUI.OverrideUI #region 组件替换 #if UNITY_EDITOR - [UnityEditor.MenuItem("CONTEXT/XericStyleButton/Xeric UI/强制刷新样式", false, 1)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "XericStyleButton/Xeric UI/强制刷新样式", false, 1)] private static void ForceRefreshStyle(UnityEditor.MenuCommand command) { StyleRefreshManager.ForceRefreshAll(); } - [UnityEditor.MenuItem("CONTEXT/Button/Replace To/Xeric (Style)", true)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Xeric (Style)", true)] private static bool ValidateReplaceToStyleButton(UnityEditor.MenuCommand command) => command.context is Button and not XericStyleButton; - [UnityEditor.MenuItem("CONTEXT/Button/Replace To/Xeric (Style)", false, 11)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Xeric (Style)", false, 11)] private static void ReplaceToStyleButton(UnityEditor.MenuCommand command) => command.ReplaceCommandContext( @@ -198,11 +199,11 @@ namespace XericUI.OverrideUI t.navigation = d.navigation; }); - [UnityEditor.MenuItem("CONTEXT/Button/Replace To/Unity Button (Style)", true)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Unity Button (Style)", true)] private static bool ValidateReplaceStyleToUnity(UnityEditor.MenuCommand command) => command.context is XericStyleButton; - [UnityEditor.MenuItem("CONTEXT/Button/Replace To/Unity Button (Style)", false, 100)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Button/Replace To/Unity Button (Style)", false, 100)] private static void ReplaceStyleToUnity(UnityEditor.MenuCommand command) => command.ReplaceCommandContext( diff --git a/Runtime/OverrideUI/XericStyleImage.cs b/Runtime/OverrideUI/XericStyleImage.cs index 604a909..a943fe4 100644 --- a/Runtime/OverrideUI/XericStyleImage.cs +++ b/Runtime/OverrideUI/XericStyleImage.cs @@ -4,6 +4,7 @@ using UnityEngine.UI; using XericLibrary.Runtime.SuperStyleSheet; using XericUI.Core.StyleSheetUI; using XericUI.Helper; +using XericUI.Core; namespace XericUI.OverrideUI { @@ -11,7 +12,7 @@ namespace XericUI.OverrideUI /// 基于 SuperStyleSheet 的图像组件。 /// 使用 StyleField 引用样式表中的颜色和纹理路径,样式变更时自动刷新。 /// - [AddComponentMenu("Xeric UI Vessel/UI/Style Image", 53)] + [AddComponentMenu(XericRegistrationPaths.UI + "/Style Image", 53)] public class XericStyleImage : Image { #region 序列化字段 @@ -165,21 +166,21 @@ namespace XericUI.OverrideUI #region 组件替换 #if UNITY_EDITOR - [UnityEditor.MenuItem("CONTEXT/Image/Replace To/Xeric (Style)", true)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Image/Replace To/Xeric (Style)", true)] private static bool ValidateReplaceToStyleImage(UnityEditor.MenuCommand command) => command.context is Image and not XericStyleImage; - [UnityEditor.MenuItem("CONTEXT/Image/Replace To/Xeric (Style)", false, 11)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Image/Replace To/Xeric (Style)", false, 11)] private static void ReplaceToStyleImage(UnityEditor.MenuCommand command) => command.ReplaceCommandContext( o => o.sprite, (t, d) => { t.sprite = d; }); - [UnityEditor.MenuItem("CONTEXT/Image/Replace To/Unity Image (Style)", true)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Image/Replace To/Unity Image (Style)", true)] private static bool ValidateReplaceStyleImageToUnity(UnityEditor.MenuCommand command) => command.context is XericStyleImage; - [UnityEditor.MenuItem("CONTEXT/Image/Replace To/Unity Image (Style)", false, 100)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Image/Replace To/Unity Image (Style)", false, 100)] private static void ReplaceStyleImageToUnity(UnityEditor.MenuCommand command) => command.ReplaceCommandContext( o => o.sprite, diff --git a/Runtime/OverrideUI/XericStyleToggle.cs b/Runtime/OverrideUI/XericStyleToggle.cs index ef92265..861c4ba 100644 --- a/Runtime/OverrideUI/XericStyleToggle.cs +++ b/Runtime/OverrideUI/XericStyleToggle.cs @@ -4,6 +4,7 @@ using UnityEngine.UI; using XericLibrary.Runtime.SuperStyleSheet; using XericUI.Core.StyleSheetUI; using XericUI.Helper; +using XericUI.Core; namespace XericUI.OverrideUI { @@ -12,7 +13,7 @@ namespace XericUI.OverrideUI /// 通过 TransitionMode 选择颜色切换、纹理切换或两者并用, /// 额外支持 isOn 覆盖和 Checkmark 样式。 /// - [AddComponentMenu("Xeric UI Vessel/UI/Style Toggle", 52)] + [AddComponentMenu(XericRegistrationPaths.UI + "/Style Toggle", 52)] public class XericStyleToggle : Toggle, IStyleRefreshable { /// 样式过渡模式 @@ -236,28 +237,28 @@ namespace XericUI.OverrideUI #region 组件替换 #if UNITY_EDITOR - [UnityEditor.MenuItem("CONTEXT/XericStyleToggle/Xeric UI/强制刷新样式", false, 1)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "XericStyleToggle/Xeric UI/强制刷新样式", false, 1)] private static void ForceRefreshStyle(UnityEditor.MenuCommand command) { StyleRefreshManager.ForceRefreshAll(); } - [UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Xeric (Style)", true)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Xeric (Style)", true)] private static bool ValidateReplaceToStyleToggle(UnityEditor.MenuCommand command) => command.context is Toggle and not XericStyleToggle; - [UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Xeric (Style)", false, 11)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Xeric (Style)", false, 11)] private static void ReplaceToStyleToggle(UnityEditor.MenuCommand command) => command.ReplaceCommandContext( o => (o.graphic, o.group, o.onValueChanged, o.navigation), (t, d) => { t.graphic = d.graphic; t.group = d.group; t.onValueChanged = d.onValueChanged; t.navigation = d.navigation; }); - [UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Unity Toggle (Style)", true)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Unity Toggle (Style)", true)] private static bool ValidateReplaceStyleToggleToUnity(UnityEditor.MenuCommand command) => command.context is XericStyleToggle; - [UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Unity Toggle (Style)", false, 100)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Unity Toggle (Style)", false, 100)] private static void ReplaceStyleToggleToUnity(UnityEditor.MenuCommand command) => command.ReplaceCommandContext( diff --git a/Runtime/OverrideUI/XericToggle.cs b/Runtime/OverrideUI/XericToggle.cs index 0986a2b..06a5ec6 100644 --- a/Runtime/OverrideUI/XericToggle.cs +++ b/Runtime/OverrideUI/XericToggle.cs @@ -7,11 +7,12 @@ using UnityEngine.Serialization; using UnityEngine.UI; using XericUI.Helper; using XericUI.OverrideUI; +using XericUI.Core; namespace XericUI { - [AddComponentMenu("Xeric UI Vessel/UI/Toggle", 31)] + [AddComponentMenu(XericRegistrationPaths.UI + "/Toggle", 31)] [DisallowMultipleComponent] public class XericToggle : Toggle { @@ -279,11 +280,11 @@ namespace XericUI #region 组件替换 #if UNITY_EDITOR - [UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Xeric Toggle", true)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Xeric Toggle", true)] private static bool ValidateReplaceToXeric(UnityEditor.MenuCommand command) => command.context is Toggle and not XericToggle; - [UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Xeric Toggle", false, 10)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Xeric Toggle", false, 10)] private static void ReplaceToXeric(UnityEditor.MenuCommand command) { command.ReplaceCommandContext command.context is XericToggle; - [UnityEditor.MenuItem("CONTEXT/Toggle/Replace To/Unity Toggle (Native)", false, 100)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "Toggle/Replace To/Unity Toggle (Native)", false, 100)] private static void ReplaceToUnity(UnityEditor.MenuCommand command) => command.ReplaceCommandContext( diff --git a/Runtime/OverrideUI/XericToggleGroup.cs b/Runtime/OverrideUI/XericToggleGroup.cs index 04dbe30..50b1c20 100644 --- a/Runtime/OverrideUI/XericToggleGroup.cs +++ b/Runtime/OverrideUI/XericToggleGroup.cs @@ -2,29 +2,30 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using XericUI.Helper; +using XericUI.Core; namespace XericUI.OverrideUI { - [AddComponentMenu("Xeric UI Vessel/UI/ToggleGroup", 31)] + [AddComponentMenu(XericRegistrationPaths.UI + "/ToggleGroup", 31)] [DisallowMultipleComponent] public class XericToggleGroup : ToggleGroup { #region 组件替换 #if UNITY_EDITOR - [UnityEditor.MenuItem("CONTEXT/ToggleGroup/Replace To/Xeric ToggleGroup", true)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ToggleGroup/Replace To/Xeric ToggleGroup", true)] private static bool ValidateReplaceToXeric(UnityEditor.MenuCommand command) => command.context is ToggleGroup and not XericToggleGroup; - [UnityEditor.MenuItem("CONTEXT/ToggleGroup/Replace To/Xeric ToggleGroup", false, 10)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ToggleGroup/Replace To/Xeric ToggleGroup", false, 10)] private static void ReplaceToXeric(UnityEditor.MenuCommand command) => command.ReplaceCommandContext(); - [UnityEditor.MenuItem("CONTEXT/ToggleGroup/Replace To/Unity ToggleGroup", true)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ToggleGroup/Replace To/Unity ToggleGroup", true)] private static bool ValidateReplaceToUnity(UnityEditor.MenuCommand command) => command.context is XericToggleGroup; - [UnityEditor.MenuItem("CONTEXT/ToggleGroup/Replace To/Unity ToggleGroup", false, 100)] + [UnityEditor.MenuItem(XericRegistrationPaths.ContextPrefix + "ToggleGroup/Replace To/Unity ToggleGroup", false, 100)] private static void ReplaceToUnity(UnityEditor.MenuCommand command) => command.ReplaceCommandContext(); #endif diff --git a/Runtime/VisualForm/AdvancedAnchorDock.cs b/Runtime/VisualForm/AdvancedAnchorDock.cs index a04c52e..fd094db 100644 --- a/Runtime/VisualForm/AdvancedAnchorDock.cs +++ b/Runtime/VisualForm/AdvancedAnchorDock.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using UnityEngine; +using XericUI.Core; namespace XericUI.VisualForm { @@ -14,7 +15,7 @@ namespace XericUI.VisualForm /// 4. 构建四叉树 → 迭代推挤分离 → 写入 CollisionOffset /// 5. 下一帧 UpdateStatePosition 通过 EffectiveOffset 自动应用碰撞偏移 /// - [AddComponentMenu("Xeric UI Vessel/AnchorWindow/AdvancedAnchorDock")] + [AddComponentMenu(XericRegistrationPaths.AnchorWindow + "/AdvancedAnchorDock")] public class AdvancedAnchorDock : AnchorDock { [Header("碰撞分离")] diff --git a/Runtime/VisualForm/AnchorDock.cs b/Runtime/VisualForm/AnchorDock.cs index 1d51c9b..0d8cd5f 100644 --- a/Runtime/VisualForm/AnchorDock.cs +++ b/Runtime/VisualForm/AnchorDock.cs @@ -3,6 +3,7 @@ using UnityEngine; using UnityEngine.UI; using XericLibrary.Runtime.MacroLibrary; using System; +using XericUI.Core; namespace XericUI.VisualForm { @@ -10,7 +11,7 @@ namespace XericUI.VisualForm /// 锚点坞 - 挂载在Canvas上的主要布局组件管理器。 /// 负责收集所有世界锚点,每帧将世界坐标转换到屏幕坐标,并管理中间窗口状态。 /// - [AddComponentMenu("Xeric UI Vessel/AnchorWindow/AnchorDock")] + [AddComponentMenu(XericRegistrationPaths.AnchorWindow + "/AnchorDock")] [DefaultExecutionOrder(31000)] public class AnchorDock : MonoBehaviour { diff --git a/Runtime/VisualForm/AnchorWindow.cs b/Runtime/VisualForm/AnchorWindow.cs index 0a6b234..8972692 100644 --- a/Runtime/VisualForm/AnchorWindow.cs +++ b/Runtime/VisualForm/AnchorWindow.cs @@ -2,13 +2,14 @@ using System; using System.Collections.Generic; using System.Linq; using UnityEngine; +using XericUI.Core; namespace XericUI.VisualForm { /// /// 锚点窗口 /// - [AddComponentMenu("Xeric UI Vessel/AnchorWindow/AnchorWindow")] + [AddComponentMenu(XericRegistrationPaths.AnchorWindow + "/AnchorWindow")] public class AnchorWindowByDefaultEntry : AnchorWindow { } /// diff --git a/Runtime/VisualForm/WorldAnchor.cs b/Runtime/VisualForm/WorldAnchor.cs index 9f9039e..5b7ea2c 100644 --- a/Runtime/VisualForm/WorldAnchor.cs +++ b/Runtime/VisualForm/WorldAnchor.cs @@ -1,11 +1,12 @@ using UnityEngine; +using XericUI.Core; namespace XericUI.VisualForm { /// /// 世界对象锚点 - 挂载在场景对象上,将世界空间位置传递给锚点坞进行屏幕空间定位 /// - [AddComponentMenu("Xeric UI Vessel/AnchorWindow/WorldAnchor")] + [AddComponentMenu(XericRegistrationPaths.AnchorWindow + "/WorldAnchor")] public class WorldAnchor : XvFormBase { [SerializeField, Tooltip("目标锚点坞,不填则自动在父级中查找")] diff --git a/Runtime/VisualForm/XvFormBase.cs b/Runtime/VisualForm/XvFormBase.cs index 0e0ed4a..e3c0d8d 100644 --- a/Runtime/VisualForm/XvFormBase.cs +++ b/Runtime/VisualForm/XvFormBase.cs @@ -1,11 +1,12 @@ using UnityEngine; +using XericUI.Core; namespace XericUI.VisualForm { /// /// 虚拟窗体基类,提供基础的窗体标记功能 /// - [AddComponentMenu("Xeric UI Vessel/AnchorWindow/XvFormBase")] + [AddComponentMenu(XericRegistrationPaths.AnchorWindow + "/XvFormBase")] public class XvFormBase : MonoBehaviour { [SerializeField] diff --git a/Runtime/XTable/Core/XTableConfig.cs b/Runtime/XTable/Core/XTableConfig.cs index dd53e4f..2c30a45 100644 --- a/Runtime/XTable/Core/XTableConfig.cs +++ b/Runtime/XTable/Core/XTableConfig.cs @@ -1,4 +1,5 @@ using UnityEngine; +using XericUI.Core; namespace XericUI.XTable.Core { @@ -7,7 +8,7 @@ namespace XericUI.XTable.Core /// 表格组件在 Awake 时自动加载 Resources 中的 "XTableDefaultConfig", /// 或由外部脚本在初始化阶段显式赋值。 /// - [CreateAssetMenu(fileName = "XTableConfig", menuName = "Xeric Library/Table/Table Config", order = 100)] + [CreateAssetMenu(fileName = "XTableConfig", menuName = XericRegistrationPaths.Table + "/Table Config", order = 100)] public class XTableConfig : ScriptableObject { #region 布局 diff --git a/Runtime/XTable/Rendering/Component/XericUIActionTable.Api.cs b/Runtime/XTable/Rendering/Component/XericUIActionTable.Api.cs index eb1ef67..9a49021 100644 --- a/Runtime/XTable/Rendering/Component/XericUIActionTable.Api.cs +++ b/Runtime/XTable/Rendering/Component/XericUIActionTable.Api.cs @@ -9,6 +9,8 @@ using XericUI.XTable.Core; using XericUI.XTable.Mapping; using XericUI.XTable.Rendering.Elements; using XericLibrary.Runtime.SuperStyleSheet; +// 守卫外:[ContextMenu(XericRegistrationPaths.Table + …)] 是运行时属性,玩家编译也要算出常量 +using XericUI.Core; #if UNITY_EDITOR using UnityEditor; #endif @@ -647,7 +649,7 @@ namespace XericUI.XTable.Rendering.Component /// 行为:立即销毁池与渲染器;CheckUpdate 内禁止调用。 /// 建议:仅用于初始化或故障恢复,不要与批量业务更新混用。 /// - [ContextMenu("Xeric UI/完全重建表格")] + [ContextMenu(XericRegistrationPaths.Table + "/完全重建表格")] public void FullRebuild() { ThrowIfCheckingUpdate(nameof(FullRebuild)); diff --git a/Runtime/XTable/Rendering/Component/XericUIActionTable.cs b/Runtime/XTable/Rendering/Component/XericUIActionTable.cs index 3608d82..318e992 100644 --- a/Runtime/XTable/Rendering/Component/XericUIActionTable.cs +++ b/Runtime/XTable/Rendering/Component/XericUIActionTable.cs @@ -5,6 +5,8 @@ using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; using XericUI.Core.Base; +// 守卫外:下面 [AddComponentMenu(XericRegistrationPaths.Table + …)] 的参数玩家编译也要算出常量 +using XericUI.Core; using XericUI.XTable.Core; using XericUI.XTable.Mapping; using XericUI.XTable.Rendering.Elements; @@ -22,7 +24,7 @@ namespace XericUI.XTable.Rendering.Component /// 无行列标题、无样式差异分割线——所有内容由数据定义。 /// [ExecuteAlways] - [AddComponentMenu("Xeric UI Vessel/Table/Xeric UI Action Table", 60)] + [AddComponentMenu(XericRegistrationPaths.Table + "/Xeric UI Action Table", 60)] public partial class XericUIActionTable : XericUIBehaviour { #region 序列化字段