refactor(注册路径): 调用点收进 XericRegistrationPaths,46 个文件只动注册属性行

10-27 那笔把表的根定成 XericLibrary,但 58 处 AddComponentMenu、4 处 CreateAssetMenu
和若干 MenuItem/ContextMenu 还各自写着 "Xeric UI Vessel/…"、"Xeric/XChart/…" 三套
旧字面量;那批转换一直停在工程里没提交。本笔只收这 46 个"除注册属性外没有别的改动"
的文件,路径出处从此只在表里一处。

工作区里另外 3 个文件(XericImage 的角偏移、IVisibility 接口、XericInfiniteVesselBase
的 region/注释)混着功能改动,不在本笔;Editor/OverrideUI/XericImageEditor.cs 与
Runtime/OverrideUI/XericImageDeform.cs 两个未入库新文件也不在。
This commit is contained in:
2026-10-30 12:34:34 +08:00
parent 013147ea7d
commit 4e760d59d1
46 changed files with 127 additions and 76 deletions
@@ -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)]
/// <summary>
/// Layout child layout elements below each other.
/// </summary>
+6 -5
View File
@@ -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<ScrollRect, XericScrollRect,
(RectTransform Viewport, RectTransform Content, Scrollbar HScrollbar, Scrollbar VScrollbar)>(
@@ -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<XericScrollRect, ScrollRect,
(RectTransform Viewport, RectTransform Content, Scrollbar HScrollbar, Scrollbar VScrollbar)>(
@@ -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)]
/// <summary>
/// Layout child layout elements below each other.
/// </summary>