From 38fb83548d46210b05beb202091cd70461d7ca69 Mon Sep 17 00:00:00 2001 From: hevinci Date: Fri, 18 Aug 2023 18:31:15 +0800 Subject: [PATCH] update asset bundle reporter --- .../VisualViewers/ReporterBundleListViewer.cs | 18 +++++++++--------- .../ReporterBundleListViewer.uxml | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Assets/YooAsset/Editor/AssetBundleReporter/VisualViewers/ReporterBundleListViewer.cs b/Assets/YooAsset/Editor/AssetBundleReporter/VisualViewers/ReporterBundleListViewer.cs index 2e19255..577f9b7 100644 --- a/Assets/YooAsset/Editor/AssetBundleReporter/VisualViewers/ReporterBundleListViewer.cs +++ b/Assets/YooAsset/Editor/AssetBundleReporter/VisualViewers/ReporterBundleListViewer.cs @@ -349,24 +349,24 @@ namespace YooAsset.Editor private void FillIncludeListView(ReportBundleInfo bundleInfo) { List containsList = new List(); - Dictionary tempAssetDict = new Dictionary(); + HashSet mainAssetDic = new HashSet(); foreach (var assetInfo in _buildReport.AssetInfos) { if (assetInfo.MainBundleName == bundleInfo.BundleName) { - tempAssetDict.Add(assetInfo.AssetPath, 1); + mainAssetDic.Add(assetInfo.AssetPath); containsList.Add(assetInfo); - } + } } - foreach (string includeInAsset in bundleInfo.AllBuiltinAssets) + foreach (string assetPath in bundleInfo.AllBuiltinAssets) { - if (!tempAssetDict.ContainsKey(includeInAsset)) + if (mainAssetDic.Contains(assetPath) == false) { var assetInfo = new ReportAssetInfo(); - assetInfo.AssetPath = includeInAsset; + assetInfo.AssetPath = assetPath; assetInfo.AssetGUID = "--"; containsList.Add(assetInfo); - } + } } _includeListView.Clear(); @@ -396,7 +396,7 @@ namespace YooAsset.Editor label.style.unityTextAlign = TextAnchor.MiddleLeft; label.style.marginLeft = 3f; //label.style.flexGrow = 1f; - label.style.width = 200; + label.style.width = 100; element.Add(label); } @@ -423,7 +423,7 @@ namespace YooAsset.Editor // Asset Source var label3 = element.Q