补充注释及更多用法。

This commit is contained in:
2026-07-06 17:04:54 +08:00
parent d938aa9929
commit 45944e4539
5 changed files with 406 additions and 134 deletions
+17
View File
@@ -7,6 +7,10 @@ using UnityEngine.Serialization;
using UnityEngine.UI;
using XericLibrary.Runtime.Debuger;
using XericLibrary.Runtime.MacroLibrary;
#if UNITY_EDITOR
using UnityEditor;
#endif
#if ODIN_INSPECTOR
using Sirenix.OdinInspector;
#endif
@@ -315,6 +319,19 @@ namespace XericLibrary.Runtime.UIGraph
BorderColorLinear = borderColor2;
FillColor = fillColor;
}
[MenuItem("GameObject/Xeric Library/UI/UIPatternRenderer", false, 10)]
private static void CreateGameObject()
{
GameObject newObject = new GameObject(nameof(UIPatternRenderer), typeof(UIPatternRenderer));
if (Selection.activeGameObject != null)
newObject.transform.SetParent(Selection.activeGameObject.transform);
Undo.RegisterCreatedObjectUndo(newObject, $"Create {nameof(UIPatternRenderer)}");
Selection.activeObject = newObject;
}
#endif
}
}