Update AssetBundleReporter

增加主资源总数的统计。
pull/28/head
hevinci 2022-07-18 16:26:47 +08:00
parent 6446b3ed40
commit aea9099e34
3 changed files with 7 additions and 0 deletions

View File

@ -90,6 +90,7 @@ namespace YooAsset.Editor
// 构建结果
public int AssetFileTotalCount;
public int MainAssetTotalCount;
public int AllBundleTotalCount;
public long AllBundleTotalSize;
public int BuildinBundleTotalCount;

View File

@ -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;

View File

@ -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}"));