mirror of https://github.com/tuyoogame/YooAsset
update asset bundle reporter
parent
e3e810e702
commit
a618b6cf9e
|
@ -349,24 +349,24 @@ namespace YooAsset.Editor
|
||||||
private void FillIncludeListView(ReportBundleInfo bundleInfo)
|
private void FillIncludeListView(ReportBundleInfo bundleInfo)
|
||||||
{
|
{
|
||||||
List<ReportAssetInfo> containsList = new List<ReportAssetInfo>();
|
List<ReportAssetInfo> containsList = new List<ReportAssetInfo>();
|
||||||
Dictionary<string, int> tempAssetDict = new Dictionary<string, int>();
|
HashSet<string> mainAssetDic = new HashSet<string>();
|
||||||
foreach (var assetInfo in _buildReport.AssetInfos)
|
foreach (var assetInfo in _buildReport.AssetInfos)
|
||||||
{
|
{
|
||||||
if (assetInfo.MainBundleName == bundleInfo.BundleName)
|
if (assetInfo.MainBundleName == bundleInfo.BundleName)
|
||||||
{
|
{
|
||||||
tempAssetDict.Add(assetInfo.AssetPath, 1);
|
mainAssetDic.Add(assetInfo.AssetPath);
|
||||||
containsList.Add(assetInfo);
|
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();
|
var assetInfo = new ReportAssetInfo();
|
||||||
assetInfo.AssetPath = includeInAsset;
|
assetInfo.AssetPath = assetPath;
|
||||||
assetInfo.AssetGUID = "--";
|
assetInfo.AssetGUID = "--";
|
||||||
containsList.Add(assetInfo);
|
containsList.Add(assetInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_includeListView.Clear();
|
_includeListView.Clear();
|
||||||
|
@ -396,7 +396,7 @@ namespace YooAsset.Editor
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
label.style.marginLeft = 3f;
|
label.style.marginLeft = 3f;
|
||||||
//label.style.flexGrow = 1f;
|
//label.style.flexGrow = 1f;
|
||||||
label.style.width = 200;
|
label.style.width = 100;
|
||||||
element.Add(label);
|
element.Add(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ namespace YooAsset.Editor
|
||||||
|
|
||||||
// Asset Source
|
// Asset Source
|
||||||
var label3 = element.Q<Label>("Label3");
|
var label3 = element.Q<Label>("Label3");
|
||||||
label3.text = assetInfo.AssetGUID != "--" ? "Main Asset" : "Include Asset";
|
label3.text = assetInfo.AssetGUID != "--" ? "Main Asset" : "Builtin Asset";
|
||||||
|
|
||||||
// GUID
|
// GUID
|
||||||
var label2 = element.Q<Label>("Label2");
|
var label2 = element.Q<Label>("Label2");
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<ui:VisualElement name="BottomGroup" style="height: 200px; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); margin-left: 0; margin-right: 0; margin-top: 1px; margin-bottom: 1px; display: flex;">
|
<ui:VisualElement name="BottomGroup" style="height: 200px; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); margin-left: 0; margin-right: 0; margin-top: 1px; margin-bottom: 1px; display: flex;">
|
||||||
<uie:Toolbar name="BottomBar" style="height: 25px; margin-left: 1px; margin-right: 1px;">
|
<uie:Toolbar name="BottomBar" style="height: 25px; margin-left: 1px; margin-right: 1px;">
|
||||||
<uie:ToolbarButton text="Include Assets" display-tooltip-when-elided="true" name="BottomBar1" style="width: 280px; -unity-text-align: middle-left; flex-grow: 1;" />
|
<uie:ToolbarButton text="Include Assets" display-tooltip-when-elided="true" name="BottomBar1" style="width: 280px; -unity-text-align: middle-left; flex-grow: 1;" />
|
||||||
<uie:ToolbarButton text="Asset Source" display-tooltip-when-elided="true" name="BottomBar3" style="width: 200px; -unity-text-align: middle-left;" />
|
<uie:ToolbarButton text="Asset Source" display-tooltip-when-elided="true" name="BottomBar3" style="width: 100px; -unity-text-align: middle-left;" />
|
||||||
<uie:ToolbarButton text="GUID" display-tooltip-when-elided="true" name="BottomBar2" style="width: 280px; -unity-text-align: middle-left;" />
|
<uie:ToolbarButton text="GUID" display-tooltip-when-elided="true" name="BottomBar2" style="width: 280px; -unity-text-align: middle-left;" />
|
||||||
</uie:Toolbar>
|
</uie:Toolbar>
|
||||||
<ui:ListView focusable="true" name="BottomListView" item-height="18" virtualization-method="DynamicHeight" style="flex-grow: 1;" />
|
<ui:ListView focusable="true" name="BottomListView" item-height="18" virtualization-method="DynamicHeight" style="flex-grow: 1;" />
|
||||||
|
|
Loading…
Reference in New Issue