diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildReport/ReportSummary.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildReport/ReportSummary.cs index ef31b28..4018e2d 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildReport/ReportSummary.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildReport/ReportSummary.cs @@ -90,6 +90,7 @@ namespace YooAsset.Editor // 构建结果 public int AssetFileTotalCount; + public int MainAssetTotalCount; public int AllBundleTotalCount; public long AllBundleTotalSize; public int BuildinBundleTotalCount; diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreateReport.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreateReport.cs index c66fb86..f327884 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreateReport.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreateReport.cs @@ -61,6 +61,7 @@ namespace YooAsset.Editor // 构建结果 buildReport.Summary.AssetFileTotalCount = buildMapContext.AssetFileCount; + buildReport.Summary.MainAssetTotalCount = GetMainAssetCount(patchManifest); buildReport.Summary.AllBundleTotalCount = GetAllBundleCount(patchManifest); buildReport.Summary.AllBundleTotalSize = GetAllBundleSize(patchManifest); buildReport.Summary.BuildinBundleTotalCount = GetBuildinBundleCount(patchManifest); @@ -159,6 +160,10 @@ namespace YooAsset.Editor return result; } + private int GetMainAssetCount(PatchManifest patchManifest) + { + return patchManifest.AssetList.Count; + } private int GetAllBundleCount(PatchManifest patchManifest) { return patchManifest.BundleList.Count; diff --git a/Assets/YooAsset/Editor/AssetBundleReporter/VisualViewers/ReporterSummaryViewer.cs b/Assets/YooAsset/Editor/AssetBundleReporter/VisualViewers/ReporterSummaryViewer.cs index ad8506c..6915e3f 100644 --- a/Assets/YooAsset/Editor/AssetBundleReporter/VisualViewers/ReporterSummaryViewer.cs +++ b/Assets/YooAsset/Editor/AssetBundleReporter/VisualViewers/ReporterSummaryViewer.cs @@ -85,6 +85,7 @@ namespace YooAsset.Editor _items.Add(new ItemWrapper(string.Empty, string.Empty)); _items.Add(new ItemWrapper("构建结果", string.Empty)); _items.Add(new ItemWrapper("构建文件总数", $"{buildReport.Summary.AssetFileTotalCount}")); + _items.Add(new ItemWrapper("主资源总数", $"{buildReport.Summary.MainAssetTotalCount}")); _items.Add(new ItemWrapper("资源包总数", $"{buildReport.Summary.AllBundleTotalCount}")); _items.Add(new ItemWrapper("资源包总大小", ConvertSize(buildReport.Summary.AllBundleTotalSize))); _items.Add(new ItemWrapper("内置资源包总数", $"{buildReport.Summary.BuildinBundleTotalCount}"));