update asset bundle builder

pull/497/head
何冠峰 2025-02-20 12:04:42 +08:00
parent a5b68b28b2
commit a3ceb3dcb6
2 changed files with 17 additions and 6 deletions

View File

@ -18,11 +18,7 @@ namespace YooAsset.Editor
// 概述信息
{
#if UNITY_2019_4_OR_NEWER
UnityEditor.PackageManager.PackageInfo packageInfo = UnityEditor.PackageManager.PackageInfo.FindForAssembly(typeof(BuildReport).Assembly);
if (packageInfo != null)
buildReport.Summary.YooVersion = packageInfo.version;
#endif
buildReport.Summary.YooVersion = EditorTools.GetPackageManagerYooVersion();
buildReport.Summary.UnityVersion = UnityEngine.Application.unityVersion;
buildReport.Summary.BuildDate = DateTime.Now.ToString();
buildReport.Summary.BuildSeconds = BuildRunner.TotalSeconds;

View File

@ -129,6 +129,21 @@ namespace YooAsset.Editor
}
#endregion
#region PackageManager
public static string GetPackageManagerYooVersion()
{
#if UNITY_2019_4_OR_NEWER
UnityEditor.PackageManager.PackageInfo packageInfo = UnityEditor.PackageManager.PackageInfo.FindForAssembly(typeof(YooAssets).Assembly);
if (packageInfo != null)
return packageInfo.version;
else
return string.Empty;
#else
return string.Empty;
#endif
}
#endregion
#region EditorUtility
/// <summary>
/// 搜集资源
@ -559,7 +574,7 @@ namespace YooAsset.Editor
{
return path.Replace('\\', '/').Replace("\\", "/"); //替换为Linux路径格式
}
/// <summary>
/// 移除路径里的后缀名
/// </summary>