Archived
补充注释及更多用法。
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user