重构了资源构建页面,方便扩展自定义界面。
This commit is contained in:
何冠峰
2025-06-17 15:29:54 +08:00
parent 06a50a049e
commit 3949abb53f
33 changed files with 814 additions and 498 deletions

View File

@@ -129,6 +129,23 @@ namespace YooAsset.Editor
}
#endregion
#region Attribute
public static T GetAttribute<T>(Type type) where T : Attribute
{
return (T)type.GetCustomAttribute(typeof(T), false);
}
public static T GetAttribute<T>(MethodInfo methodInfo) where T : Attribute
{
return (T)methodInfo.GetCustomAttribute(typeof(T), false);
}
public static T GetAttribute<T>(FieldInfo field) where T : Attribute
{
return (T)field.GetCustomAttribute(typeof(T), false);
}
#endregion
#region PackageManager
public static string GetPackageManagerYooVersion()
{