mirror of https://github.com/tuyoogame/YooAsset
update asset bundle debugger
parent
912e2c28a3
commit
655f756d56
|
@ -240,8 +240,8 @@ namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
_currentReport = debugReport;
|
_currentReport = debugReport;
|
||||||
_frameSlider.label = $"Frame: {debugReport.FrameCount}";
|
_frameSlider.label = $"Frame: {debugReport.FrameCount}";
|
||||||
_assetListViewer.FillViewData(debugReport, _searchKeyWord);
|
_assetListViewer.FillViewData(debugReport);
|
||||||
_bundleListViewer.FillViewData(debugReport, _searchKeyWord);
|
_bundleListViewer.FillViewData(debugReport);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,8 +286,8 @@ namespace YooAsset.Editor
|
||||||
_searchKeyWord = e.newValue;
|
_searchKeyWord = e.newValue;
|
||||||
if (_currentReport != null)
|
if (_currentReport != null)
|
||||||
{
|
{
|
||||||
_assetListViewer.FillViewData(_currentReport, _searchKeyWord);
|
_assetListViewer.RebuildView(_searchKeyWord);
|
||||||
_bundleListViewer.FillViewData(_currentReport, _searchKeyWord);
|
_bundleListViewer.RebuildView(_searchKeyWord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void OnViewModeMenuChange(DropdownMenuAction action)
|
private void OnViewModeMenuChange(DropdownMenuAction action)
|
||||||
|
|
|
@ -11,12 +11,24 @@ namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
internal class DebuggerAssetListViewer
|
internal class DebuggerAssetListViewer
|
||||||
{
|
{
|
||||||
|
private class ProviderTableData : DefaultTableData
|
||||||
|
{
|
||||||
|
public DebugProviderInfo ProviderInfo;
|
||||||
|
}
|
||||||
|
private class DependTableData : DefaultTableData
|
||||||
|
{
|
||||||
|
public DebugBundleInfo BundleInfo;
|
||||||
|
}
|
||||||
|
|
||||||
private VisualTreeAsset _visualAsset;
|
private VisualTreeAsset _visualAsset;
|
||||||
private TemplateContainer _root;
|
private TemplateContainer _root;
|
||||||
|
|
||||||
private ListView _assetListView;
|
private TableView _providerTableView;
|
||||||
private ListView _dependListView;
|
private TableView _dependTableView;
|
||||||
|
|
||||||
private DebugReport _debugReport;
|
private DebugReport _debugReport;
|
||||||
|
private List<ITableData> _sourceDatas;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 初始化页面
|
/// 初始化页面
|
||||||
|
@ -32,26 +44,343 @@ namespace YooAsset.Editor
|
||||||
_root.style.flexGrow = 1f;
|
_root.style.flexGrow = 1f;
|
||||||
|
|
||||||
// 资源列表
|
// 资源列表
|
||||||
_assetListView = _root.Q<ListView>("TopListView");
|
_providerTableView = _root.Q<TableView>("TopTableView");
|
||||||
_assetListView.makeItem = MakeAssetListViewItem;
|
_providerTableView.SelectionChangedEvent = OnProviderTableViewSelectionChanged;
|
||||||
_assetListView.bindItem = BindAssetListViewItem;
|
CreateAssetTableViewColumns();
|
||||||
#if UNITY_2022_3_OR_NEWER
|
|
||||||
_assetListView.selectionChanged += AssetListView_onSelectionChange;
|
|
||||||
#elif UNITY_2020_1_OR_NEWER
|
|
||||||
_assetListView.onSelectionChange += AssetListView_onSelectionChange;
|
|
||||||
#else
|
|
||||||
_assetListView.onSelectionChanged += AssetListView_onSelectionChange;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 依赖列表
|
// 依赖列表
|
||||||
_dependListView = _root.Q<ListView>("BottomListView");
|
_dependTableView = _root.Q<TableView>("BottomTableView");
|
||||||
_dependListView.makeItem = MakeDependListViewItem;
|
CreateDependTableViewColumns();
|
||||||
_dependListView.bindItem = BindDependListViewItem;
|
|
||||||
|
|
||||||
#if UNITY_2020_3_OR_NEWER
|
#if UNITY_2020_3_OR_NEWER
|
||||||
SplitView.Adjuster(_root);
|
SplitView.Adjuster(_root);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
private void CreateAssetTableViewColumns()
|
||||||
|
{
|
||||||
|
// PackageName
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("PackageName", "Package Name", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_providerTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// AssetPath
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 300;
|
||||||
|
columnStyle.Stretchable = true;
|
||||||
|
columnStyle.Searchable = true;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("AssetPath", "Asset Path", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_providerTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// SpawnScene
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("SpawnScene", "Spawn Scene", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_providerTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// SpawnTime
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("SpawnTime", "Spawn Time", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_providerTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// LoadingTime
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("LoadingTime", "Loading Time", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_providerTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// RefCount
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("RefCount", "Ref Count", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_providerTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Status
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("Status", "Status", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
StyleColor textColor;
|
||||||
|
var providerTableData = data as ProviderTableData;
|
||||||
|
if(providerTableData.ProviderInfo.Status == EOperationStatus.Failed.ToString())
|
||||||
|
textColor = new StyleColor(Color.yellow);
|
||||||
|
else
|
||||||
|
textColor = new StyleColor(Color.white);
|
||||||
|
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
infoLabel.style.color = textColor;
|
||||||
|
};
|
||||||
|
_providerTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void CreateDependTableViewColumns()
|
||||||
|
{
|
||||||
|
//DependBundles
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 300;
|
||||||
|
columnStyle.Stretchable = true;
|
||||||
|
columnStyle.Searchable = true;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("DependBundles", "Depend Bundles", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_dependTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// RefCount
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("RefCount", "Ref Count", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_dependTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Status
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("Status", "Status", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
StyleColor textColor;
|
||||||
|
var dependTableData = data as DependTableData;
|
||||||
|
if (dependTableData.BundleInfo.Status == EOperationStatus.Failed)
|
||||||
|
textColor = new StyleColor(Color.yellow);
|
||||||
|
else
|
||||||
|
textColor = new StyleColor(Color.white);
|
||||||
|
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
infoLabel.style.color = textColor;
|
||||||
|
};
|
||||||
|
_dependTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 填充页面数据
|
||||||
|
/// </summary>
|
||||||
|
public void FillViewData(DebugReport debugReport)
|
||||||
|
{
|
||||||
|
_debugReport = debugReport;
|
||||||
|
|
||||||
|
// 清空旧数据
|
||||||
|
_providerTableView.ClearAll(false, true);
|
||||||
|
_dependTableView.ClearAll(false, true);
|
||||||
|
|
||||||
|
// 填充数据源
|
||||||
|
_sourceDatas = new List<ITableData>(1000);
|
||||||
|
foreach (var packageData in debugReport.PackageDatas)
|
||||||
|
{
|
||||||
|
foreach (var providerInfo in packageData.ProviderInfos)
|
||||||
|
{
|
||||||
|
var rowData = new ProviderTableData();
|
||||||
|
rowData.ProviderInfo = providerInfo;
|
||||||
|
rowData.AddAssetPathCell("PackageName", packageData.PackageName);
|
||||||
|
rowData.AddStringValueCell("AssetPath", providerInfo.AssetPath);
|
||||||
|
rowData.AddStringValueCell("SpawnScene", providerInfo.SpawnScene);
|
||||||
|
rowData.AddStringValueCell("SpawnTime", providerInfo.SpawnTime);
|
||||||
|
rowData.AddLongValueCell("LoadingTime", providerInfo.LoadingTime);
|
||||||
|
rowData.AddLongValueCell("RefCount", providerInfo.RefCount);
|
||||||
|
rowData.AddStringValueCell("Status", providerInfo.Status.ToString());
|
||||||
|
_sourceDatas.Add(rowData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_providerTableView.itemsSource = _sourceDatas;
|
||||||
|
|
||||||
|
// 重建视图
|
||||||
|
RebuildView(null);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清空页面
|
/// 清空页面
|
||||||
|
@ -59,45 +388,21 @@ namespace YooAsset.Editor
|
||||||
public void ClearView()
|
public void ClearView()
|
||||||
{
|
{
|
||||||
_debugReport = null;
|
_debugReport = null;
|
||||||
_assetListView.Clear();
|
_providerTableView.ClearAll(false, true);
|
||||||
_assetListView.ClearSelection();
|
_dependTableView.ClearAll(false, true);
|
||||||
_assetListView.itemsSource.Clear();
|
RebuildView(null);
|
||||||
_assetListView.Rebuild();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 填充页面数据
|
/// 重建视图
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void FillViewData(DebugReport debugReport, string searchKeyWord)
|
public void RebuildView(string searchKeyWord)
|
||||||
{
|
{
|
||||||
_debugReport = debugReport;
|
// 搜索匹配
|
||||||
_assetListView.Clear();
|
DefaultSearchSystem.Search(_sourceDatas, searchKeyWord);
|
||||||
_assetListView.ClearSelection();
|
|
||||||
_assetListView.itemsSource = FilterViewItems(debugReport, searchKeyWord);
|
|
||||||
_assetListView.Rebuild();
|
|
||||||
}
|
|
||||||
private List<DebugProviderInfo> FilterViewItems(DebugReport debugReport, string searchKeyWord)
|
|
||||||
{
|
|
||||||
List<DebugProviderInfo> result = new List<DebugProviderInfo>(1000);
|
|
||||||
foreach (var packageData in debugReport.PackageDatas)
|
|
||||||
{
|
|
||||||
var tempList = new List<DebugProviderInfo>(packageData.ProviderInfos.Count);
|
|
||||||
foreach (var providerInfo in packageData.ProviderInfos)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(searchKeyWord) == false)
|
|
||||||
{
|
|
||||||
if (providerInfo.AssetPath.Contains(searchKeyWord) == false)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
providerInfo.PackageName = packageData.PackageName;
|
// 重建视图
|
||||||
tempList.Add(providerInfo);
|
_providerTableView.RebuildView();
|
||||||
}
|
|
||||||
|
|
||||||
tempList.Sort();
|
|
||||||
result.AddRange(tempList);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -116,194 +421,24 @@ namespace YooAsset.Editor
|
||||||
_root.RemoveFromHierarchy();
|
_root.RemoveFromHierarchy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnProviderTableViewSelectionChanged(ITableData data)
|
||||||
// 顶部列表相关
|
|
||||||
private VisualElement MakeAssetListViewItem()
|
|
||||||
{
|
{
|
||||||
VisualElement element = new VisualElement();
|
var providerTableData = data as ProviderTableData;
|
||||||
element.style.flexDirection = FlexDirection.Row;
|
DebugProviderInfo providerInfo = providerTableData.ProviderInfo;
|
||||||
|
|
||||||
|
// 填充依赖数据
|
||||||
|
var sourceDatas = new List<ITableData>(providerInfo.DependBundleInfos.Count);
|
||||||
|
foreach (var dependBundleInfo in providerInfo.DependBundleInfos)
|
||||||
{
|
{
|
||||||
var label = new Label();
|
var rowData = new DependTableData();
|
||||||
label.name = "Label0";
|
rowData.BundleInfo = dependBundleInfo;
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
rowData.AddStringValueCell("DependBundles", dependBundleInfo.BundleName);
|
||||||
label.style.marginLeft = 3f;
|
rowData.AddLongValueCell("RefCount", dependBundleInfo.RefCount);
|
||||||
//label.style.flexGrow = 1f;
|
rowData.AddStringValueCell("Status", dependBundleInfo.Status.ToString());
|
||||||
label.style.width = 150;
|
sourceDatas.Add(rowData);
|
||||||
element.Add(label);
|
|
||||||
}
|
}
|
||||||
|
_dependTableView.itemsSource = sourceDatas;
|
||||||
{
|
_dependTableView.RebuildView();
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label1";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 280;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label2";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 150;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label3";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 150;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label4";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 150;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label5";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 100;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label6";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 120;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
private void BindAssetListViewItem(VisualElement element, int index)
|
|
||||||
{
|
|
||||||
var sourceData = _assetListView.itemsSource as List<DebugProviderInfo>;
|
|
||||||
var providerInfo = sourceData[index];
|
|
||||||
|
|
||||||
// Package Name
|
|
||||||
var label0 = element.Q<Label>("Label0");
|
|
||||||
label0.text = providerInfo.PackageName;
|
|
||||||
|
|
||||||
// Asset Path
|
|
||||||
var label1 = element.Q<Label>("Label1");
|
|
||||||
label1.text = providerInfo.AssetPath;
|
|
||||||
|
|
||||||
// Spawn Scene
|
|
||||||
var label2 = element.Q<Label>("Label2");
|
|
||||||
label2.text = providerInfo.SpawnScene;
|
|
||||||
|
|
||||||
// Spawn Time
|
|
||||||
var label3 = element.Q<Label>("Label3");
|
|
||||||
label3.text = providerInfo.SpawnTime;
|
|
||||||
|
|
||||||
// Loading Time
|
|
||||||
var label4 = element.Q<Label>("Label4");
|
|
||||||
label4.text = providerInfo.LoadingTime.ToString();
|
|
||||||
|
|
||||||
// Ref Count
|
|
||||||
var label5 = element.Q<Label>("Label5");
|
|
||||||
label5.text = providerInfo.RefCount.ToString();
|
|
||||||
|
|
||||||
// Status
|
|
||||||
StyleColor textColor;
|
|
||||||
if (providerInfo.Status == EOperationStatus.Failed.ToString())
|
|
||||||
textColor = new StyleColor(Color.yellow);
|
|
||||||
else
|
|
||||||
textColor = label1.style.color;
|
|
||||||
var label6 = element.Q<Label>("Label6");
|
|
||||||
label6.text = providerInfo.Status.ToString();
|
|
||||||
label6.style.color = textColor;
|
|
||||||
}
|
|
||||||
private void AssetListView_onSelectionChange(IEnumerable<object> objs)
|
|
||||||
{
|
|
||||||
foreach (var item in objs)
|
|
||||||
{
|
|
||||||
DebugProviderInfo providerInfo = item as DebugProviderInfo;
|
|
||||||
FillDependListView(providerInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 底部列表相关
|
|
||||||
private VisualElement MakeDependListViewItem()
|
|
||||||
{
|
|
||||||
VisualElement element = new VisualElement();
|
|
||||||
element.style.flexDirection = FlexDirection.Row;
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label1";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 280;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label3";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 100;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label4";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 120;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
private void BindDependListViewItem(VisualElement element, int index)
|
|
||||||
{
|
|
||||||
List<DebugBundleInfo> bundles = _dependListView.itemsSource as List<DebugBundleInfo>;
|
|
||||||
DebugBundleInfo bundleInfo = bundles[index];
|
|
||||||
|
|
||||||
// Bundle Name
|
|
||||||
var label1 = element.Q<Label>("Label1");
|
|
||||||
label1.text = bundleInfo.BundleName;
|
|
||||||
|
|
||||||
// Ref Count
|
|
||||||
var label3 = element.Q<Label>("Label3");
|
|
||||||
label3.text = bundleInfo.RefCount.ToString();
|
|
||||||
|
|
||||||
// Status
|
|
||||||
var label4 = element.Q<Label>("Label4");
|
|
||||||
label4.text = bundleInfo.Status.ToString();
|
|
||||||
}
|
|
||||||
private void FillDependListView(DebugProviderInfo selectedProviderInfo)
|
|
||||||
{
|
|
||||||
_dependListView.Clear();
|
|
||||||
_dependListView.ClearSelection();
|
|
||||||
_dependListView.itemsSource = selectedProviderInfo.DependBundleInfos;
|
|
||||||
_dependListView.Rebuild();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,8 @@
|
||||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
|
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
|
||||||
<ui:VisualElement name="TopGroup" style="flex-grow: 1; 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: 2px; margin-bottom: 1px; display: flex;">
|
<ui:VisualElement name="TopGroup" style="flex-grow: 1; 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: 2px; margin-bottom: 1px; display: flex;">
|
||||||
<uie:Toolbar name="TopBar" style="height: 25px; margin-left: 1px; margin-right: 1px;">
|
<YooAsset.Editor.TableView name="TopTableView" />
|
||||||
<uie:ToolbarButton text="Package Name" display-tooltip-when-elided="true" name="TopBar0" style="width: 150px; -unity-text-align: middle-left; flex-grow: 0;" />
|
|
||||||
<uie:ToolbarButton text="Asset Path" display-tooltip-when-elided="true" name="TopBar1" style="width: 280px; -unity-text-align: middle-left; flex-grow: 1;" />
|
|
||||||
<uie:ToolbarButton text="Spawn Scene" display-tooltip-when-elided="true" name="TopBar2" style="width: 150px; -unity-text-align: middle-left; flex-grow: 0;" />
|
|
||||||
<uie:ToolbarButton text="Spawn Time" display-tooltip-when-elided="true" name="TopBar3" style="width: 150px; -unity-text-align: middle-left; flex-grow: 0;" />
|
|
||||||
<uie:ToolbarButton text="Loading Time (ms)" display-tooltip-when-elided="true" name="TopBar4" style="width: 150px; -unity-text-align: middle-left; flex-grow: 0;" />
|
|
||||||
<uie:ToolbarButton text="Ref Count" display-tooltip-when-elided="true" name="TopBar5" style="width: 100px; -unity-text-align: middle-left; flex-grow: 0;" />
|
|
||||||
<uie:ToolbarButton text="Status" display-tooltip-when-elided="true" name="TopBar6" style="width: 120px; -unity-text-align: middle-left;" />
|
|
||||||
</uie:Toolbar>
|
|
||||||
<ui:ListView focusable="true" name="TopListView" item-height="18" virtualization-method="DynamicHeight" style="flex-grow: 1;" />
|
|
||||||
</ui:VisualElement>
|
</ui:VisualElement>
|
||||||
<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;">
|
<YooAsset.Editor.TableView name="BottomTableView" />
|
||||||
<uie:ToolbarButton text="Depend Bundles" display-tooltip-when-elided="true" name="BottomBar1" style="width: 280px; -unity-text-align: middle-left; flex-grow: 1;" />
|
|
||||||
<uie:ToolbarButton text="Ref Count" display-tooltip-when-elided="true" name="BottomBar3" style="width: 100px; -unity-text-align: middle-left;" />
|
|
||||||
<uie:ToolbarButton text="Status" display-tooltip-when-elided="true" name="BottomBar4" style="width: 120px; -unity-text-align: middle-left;" />
|
|
||||||
</uie:Toolbar>
|
|
||||||
<ui:ListView focusable="true" name="BottomListView" item-height="18" virtualization-method="DynamicHeight" style="flex-grow: 1;" />
|
|
||||||
</ui:VisualElement>
|
</ui:VisualElement>
|
||||||
</ui:UXML>
|
</ui:UXML>
|
||||||
|
|
|
@ -6,17 +6,30 @@ using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEditor.UIElements;
|
using UnityEditor.UIElements;
|
||||||
using UnityEngine.UIElements;
|
using UnityEngine.UIElements;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
namespace YooAsset.Editor
|
namespace YooAsset.Editor
|
||||||
{
|
{
|
||||||
internal class DebuggerBundleListViewer
|
internal class DebuggerBundleListViewer
|
||||||
{
|
{
|
||||||
|
private class BundleTableData : DefaultTableData
|
||||||
|
{
|
||||||
|
public string PackageName;
|
||||||
|
public DebugBundleInfo BundleInfo;
|
||||||
|
}
|
||||||
|
private class UsingTableData : DefaultTableData
|
||||||
|
{
|
||||||
|
public DebugProviderInfo ProviderInfo;
|
||||||
|
}
|
||||||
|
|
||||||
private VisualTreeAsset _visualAsset;
|
private VisualTreeAsset _visualAsset;
|
||||||
private TemplateContainer _root;
|
private TemplateContainer _root;
|
||||||
|
|
||||||
private ListView _bundleListView;
|
private TableView _bundleTableView;
|
||||||
private ListView _usingListView;
|
private TableView _usingTableView;
|
||||||
|
|
||||||
private DebugReport _debugReport;
|
private DebugReport _debugReport;
|
||||||
|
private List<ITableData> _sourceDatas;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 初始化页面
|
/// 初始化页面
|
||||||
|
@ -32,26 +45,323 @@ namespace YooAsset.Editor
|
||||||
_root.style.flexGrow = 1f;
|
_root.style.flexGrow = 1f;
|
||||||
|
|
||||||
// 资源包列表
|
// 资源包列表
|
||||||
_bundleListView = _root.Q<ListView>("TopListView");
|
_bundleTableView = _root.Q<TableView>("TopTableView");
|
||||||
_bundleListView.makeItem = MakeBundleListViewItem;
|
_bundleTableView.SelectionChangedEvent = OnBundleTableViewSelectionChanged;
|
||||||
_bundleListView.bindItem = BindBundleListViewItem;
|
CreateBundleTableViewColumns();
|
||||||
#if UNITY_2022_3_OR_NEWER
|
|
||||||
_bundleListView.selectionChanged += BundleListView_onSelectionChange;
|
|
||||||
#elif UNITY_2020_1_OR_NEWER
|
|
||||||
_bundleListView.onSelectionChange += BundleListView_onSelectionChange;
|
|
||||||
#else
|
|
||||||
_bundleListView.onSelectionChanged += BundleListView_onSelectionChange;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 使用列表
|
// 使用列表
|
||||||
_usingListView = _root.Q<ListView>("BottomListView");
|
_usingTableView = _root.Q<TableView>("BottomTableView");
|
||||||
_usingListView.makeItem = MakeIncludeListViewItem;
|
CreateUsingTableViewColumns();
|
||||||
_usingListView.bindItem = BindIncludeListViewItem;
|
|
||||||
|
|
||||||
#if UNITY_2020_3_OR_NEWER
|
#if UNITY_2020_3_OR_NEWER
|
||||||
SplitView.Adjuster(_root);
|
SplitView.Adjuster(_root);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
private void CreateBundleTableViewColumns()
|
||||||
|
{
|
||||||
|
// PackageName
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("PackageName", "Package Name", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_bundleTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// BundleName
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 300;
|
||||||
|
columnStyle.Stretchable = true;
|
||||||
|
columnStyle.Searchable = true;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("BundleName", "Bundle Name", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_bundleTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// RefCount
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("RefCount", "Ref Count", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_bundleTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Status
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("Status", "Status", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
StyleColor textColor;
|
||||||
|
var bundleTableData = data as BundleTableData;
|
||||||
|
if (bundleTableData.BundleInfo.Status == EOperationStatus.Failed)
|
||||||
|
textColor = new StyleColor(Color.yellow);
|
||||||
|
else
|
||||||
|
textColor = new StyleColor(Color.white);
|
||||||
|
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
infoLabel.style.color = textColor;
|
||||||
|
};
|
||||||
|
_bundleTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void CreateUsingTableViewColumns()
|
||||||
|
{
|
||||||
|
// UsingAssets
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 300;
|
||||||
|
columnStyle.Stretchable = true;
|
||||||
|
columnStyle.Searchable = true;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("UsingAssets", "Using Assets", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_usingTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// SpawnScene
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("SpawnScene", "Spawn Scene", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_usingTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// SpawnTime
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("SpawnTime", "Spawn Time", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_usingTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// RefCount
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("RefCount", "Ref Count", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
};
|
||||||
|
_usingTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Status
|
||||||
|
{
|
||||||
|
var columnStyle = new ColumnStyle();
|
||||||
|
columnStyle.Width = 150;
|
||||||
|
columnStyle.Stretchable = false;
|
||||||
|
columnStyle.Searchable = false;
|
||||||
|
columnStyle.Sortable = true;
|
||||||
|
var column = new TableColumn("Status", "Status", columnStyle);
|
||||||
|
column.MakeCell = () =>
|
||||||
|
{
|
||||||
|
var label = new Label();
|
||||||
|
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
||||||
|
label.style.marginLeft = 3f;
|
||||||
|
label.style.flexGrow = columnStyle.Stretchable ? 1f : 0f;
|
||||||
|
label.style.width = columnStyle.Width;
|
||||||
|
label.style.maxWidth = columnStyle.MaxWidth;
|
||||||
|
label.style.minWidth = columnStyle.MinWidth;
|
||||||
|
return label;
|
||||||
|
};
|
||||||
|
column.BindCell = (VisualElement element, ITableData data, ITableCell cell) =>
|
||||||
|
{
|
||||||
|
StyleColor textColor;
|
||||||
|
var usingTableData = data as UsingTableData;
|
||||||
|
if (usingTableData.ProviderInfo.Status == EOperationStatus.Failed.ToString())
|
||||||
|
textColor = new StyleColor(Color.yellow);
|
||||||
|
else
|
||||||
|
textColor = new StyleColor(Color.white);
|
||||||
|
|
||||||
|
var infoLabel = element as Label;
|
||||||
|
infoLabel.text = (string)cell.GetDisplayObject();
|
||||||
|
infoLabel.style.color = textColor;
|
||||||
|
};
|
||||||
|
_usingTableView.AddColumn(column);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 填充页面数据
|
||||||
|
/// </summary>
|
||||||
|
public void FillViewData(DebugReport debugReport)
|
||||||
|
{
|
||||||
|
_debugReport = debugReport;
|
||||||
|
|
||||||
|
// 清空旧数据
|
||||||
|
_bundleTableView.ClearAll(false, true);
|
||||||
|
_usingTableView.ClearAll(false, true);
|
||||||
|
|
||||||
|
// 填充数据源
|
||||||
|
_sourceDatas = new List<ITableData>(1000);
|
||||||
|
foreach (var packageData in debugReport.PackageDatas)
|
||||||
|
{
|
||||||
|
var tempDic = new HashSet<string>();
|
||||||
|
foreach (var providerInfo in packageData.ProviderInfos)
|
||||||
|
{
|
||||||
|
foreach (var bundleInfo in providerInfo.DependBundleInfos)
|
||||||
|
{
|
||||||
|
if (tempDic.Contains(bundleInfo.BundleName) == false)
|
||||||
|
{
|
||||||
|
tempDic.Add(bundleInfo.BundleName);
|
||||||
|
|
||||||
|
var rowData = new BundleTableData();
|
||||||
|
rowData.PackageName = packageData.PackageName;
|
||||||
|
rowData.BundleInfo = bundleInfo;
|
||||||
|
rowData.AddAssetPathCell("PackageName", packageData.PackageName);
|
||||||
|
rowData.AddStringValueCell("BundleName", bundleInfo.BundleName);
|
||||||
|
rowData.AddLongValueCell("RefCount", bundleInfo.RefCount);
|
||||||
|
rowData.AddStringValueCell("Status", bundleInfo.Status.ToString());
|
||||||
|
_sourceDatas.Add(rowData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_bundleTableView.itemsSource = _sourceDatas;
|
||||||
|
|
||||||
|
// 重建视图
|
||||||
|
RebuildView(null);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清空页面
|
/// 清空页面
|
||||||
|
@ -59,52 +369,22 @@ namespace YooAsset.Editor
|
||||||
public void ClearView()
|
public void ClearView()
|
||||||
{
|
{
|
||||||
_debugReport = null;
|
_debugReport = null;
|
||||||
_bundleListView.Clear();
|
_bundleTableView.ClearAll(false, true);
|
||||||
_bundleListView.ClearSelection();
|
_bundleTableView.RebuildView();
|
||||||
_bundleListView.itemsSource.Clear();
|
_usingTableView.ClearAll(false, true);
|
||||||
_bundleListView.Rebuild();
|
_usingTableView.RebuildView();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 填充页面数据
|
/// 重建视图
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void FillViewData(DebugReport debugReport, string searchKeyWord)
|
public void RebuildView(string searchKeyWord)
|
||||||
{
|
{
|
||||||
_debugReport = debugReport;
|
// 搜索匹配
|
||||||
_bundleListView.Clear();
|
DefaultSearchSystem.Search(_sourceDatas, searchKeyWord);
|
||||||
_bundleListView.ClearSelection();
|
|
||||||
_bundleListView.itemsSource = FilterViewItems(debugReport, searchKeyWord);
|
|
||||||
_bundleListView.Rebuild();
|
|
||||||
}
|
|
||||||
private List<DebugBundleInfo> FilterViewItems(DebugReport debugReport, string searchKeyWord)
|
|
||||||
{
|
|
||||||
List<DebugBundleInfo> result = new List<DebugBundleInfo>(1000);
|
|
||||||
foreach (var pakcageData in debugReport.PackageDatas)
|
|
||||||
{
|
|
||||||
Dictionary<string, DebugBundleInfo> tempDic = new Dictionary<string, DebugBundleInfo>(1000);
|
|
||||||
foreach (var providerInfo in pakcageData.ProviderInfos)
|
|
||||||
{
|
|
||||||
foreach (var bundleInfo in providerInfo.DependBundleInfos)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(searchKeyWord) == false)
|
|
||||||
{
|
|
||||||
if (bundleInfo.BundleName.Contains(searchKeyWord) == false)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tempDic.ContainsKey(bundleInfo.BundleName) == false)
|
// 重建视图
|
||||||
{
|
_bundleTableView.RebuildView();
|
||||||
bundleInfo.PackageName = pakcageData.PackageName;
|
|
||||||
tempDic.Add(bundleInfo.BundleName, bundleInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var tempList = tempDic.Values.ToList();
|
|
||||||
tempList.Sort();
|
|
||||||
result.AddRange(tempList);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -123,199 +403,38 @@ namespace YooAsset.Editor
|
||||||
_root.RemoveFromHierarchy();
|
_root.RemoveFromHierarchy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnBundleTableViewSelectionChanged(ITableData data)
|
||||||
// 顶部列表相关
|
|
||||||
private VisualElement MakeBundleListViewItem()
|
|
||||||
{
|
{
|
||||||
VisualElement element = new VisualElement();
|
var bundleTableData = data as BundleTableData;
|
||||||
element.style.flexDirection = FlexDirection.Row;
|
|
||||||
|
|
||||||
{
|
// 填充依赖数据
|
||||||
var label = new Label();
|
var sourceDatas = new List<ITableData>(1000);
|
||||||
label.name = "Label0";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 150;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label1";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 280;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label3";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 100;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label4";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 120;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
private void BindBundleListViewItem(VisualElement element, int index)
|
|
||||||
{
|
|
||||||
var sourceData = _bundleListView.itemsSource as List<DebugBundleInfo>;
|
|
||||||
var bundleInfo = sourceData[index];
|
|
||||||
|
|
||||||
// Package Name
|
|
||||||
var label0 = element.Q<Label>("Label0");
|
|
||||||
label0.text = bundleInfo.PackageName;
|
|
||||||
|
|
||||||
// Bundle Name
|
|
||||||
var label1 = element.Q<Label>("Label1");
|
|
||||||
label1.text = bundleInfo.BundleName;
|
|
||||||
|
|
||||||
// Ref Count
|
|
||||||
var label3 = element.Q<Label>("Label3");
|
|
||||||
label3.text = bundleInfo.RefCount.ToString();
|
|
||||||
|
|
||||||
// Status
|
|
||||||
StyleColor textColor;
|
|
||||||
if (bundleInfo.Status == EOperationStatus.Failed)
|
|
||||||
textColor = new StyleColor(Color.yellow);
|
|
||||||
else
|
|
||||||
textColor = label1.style.color;
|
|
||||||
var label4 = element.Q<Label>("Label4");
|
|
||||||
label4.text = bundleInfo.Status.ToString();
|
|
||||||
label4.style.color = textColor;
|
|
||||||
}
|
|
||||||
private void BundleListView_onSelectionChange(IEnumerable<object> objs)
|
|
||||||
{
|
|
||||||
foreach (var item in objs)
|
|
||||||
{
|
|
||||||
DebugBundleInfo bundleInfo = item as DebugBundleInfo;
|
|
||||||
FillUsingListView(bundleInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 底部列表相关
|
|
||||||
private VisualElement MakeIncludeListViewItem()
|
|
||||||
{
|
|
||||||
VisualElement element = new VisualElement();
|
|
||||||
element.style.flexDirection = FlexDirection.Row;
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label1";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 280;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label2";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 150;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label3";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 150;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label4";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 100;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
var label = new Label();
|
|
||||||
label.name = "Label5";
|
|
||||||
label.style.unityTextAlign = TextAnchor.MiddleLeft;
|
|
||||||
label.style.marginLeft = 3f;
|
|
||||||
//label.style.flexGrow = 1f;
|
|
||||||
label.style.width = 120;
|
|
||||||
element.Add(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
private void BindIncludeListViewItem(VisualElement element, int index)
|
|
||||||
{
|
|
||||||
List<DebugProviderInfo> providers = _usingListView.itemsSource as List<DebugProviderInfo>;
|
|
||||||
DebugProviderInfo providerInfo = providers[index];
|
|
||||||
|
|
||||||
// Asset Path
|
|
||||||
var label1 = element.Q<Label>("Label1");
|
|
||||||
label1.text = providerInfo.AssetPath;
|
|
||||||
|
|
||||||
// Spawn Scene
|
|
||||||
var label2 = element.Q<Label>("Label2");
|
|
||||||
label2.text = providerInfo.SpawnScene;
|
|
||||||
|
|
||||||
// Spawn Time
|
|
||||||
var label3 = element.Q<Label>("Label3");
|
|
||||||
label3.text = providerInfo.SpawnTime;
|
|
||||||
|
|
||||||
// Ref Count
|
|
||||||
var label4 = element.Q<Label>("Label4");
|
|
||||||
label4.text = providerInfo.RefCount.ToString();
|
|
||||||
|
|
||||||
// Status
|
|
||||||
var label5 = element.Q<Label>("Label5");
|
|
||||||
label5.text = providerInfo.Status.ToString();
|
|
||||||
}
|
|
||||||
private void FillUsingListView(DebugBundleInfo selectedBundleInfo)
|
|
||||||
{
|
|
||||||
List<DebugProviderInfo> source = new List<DebugProviderInfo>();
|
|
||||||
foreach (var packageData in _debugReport.PackageDatas)
|
foreach (var packageData in _debugReport.PackageDatas)
|
||||||
{
|
{
|
||||||
if (packageData.PackageName == selectedBundleInfo.PackageName)
|
if (packageData.PackageName != bundleTableData.PackageName)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
foreach (var providerInfo in packageData.ProviderInfos)
|
||||||
{
|
{
|
||||||
foreach (var providerInfo in packageData.ProviderInfos)
|
foreach (var bundleInfo in providerInfo.DependBundleInfos)
|
||||||
{
|
{
|
||||||
foreach (var bundleInfo in providerInfo.DependBundleInfos)
|
if (bundleInfo.BundleName == bundleTableData.BundleInfo.BundleName)
|
||||||
{
|
{
|
||||||
if (bundleInfo.BundleName == selectedBundleInfo.BundleName)
|
var rowData = new UsingTableData();
|
||||||
{
|
rowData.ProviderInfo = providerInfo;
|
||||||
source.Add(providerInfo);
|
rowData.AddStringValueCell("UsingAssets", providerInfo.AssetPath);
|
||||||
continue;
|
rowData.AddStringValueCell("SpawnScene", providerInfo.SpawnScene);
|
||||||
}
|
rowData.AddStringValueCell("SpawnTime", providerInfo.SpawnTime);
|
||||||
|
rowData.AddLongValueCell("RefCount", providerInfo.RefCount);
|
||||||
|
rowData.AddStringValueCell("Status", providerInfo.Status);
|
||||||
|
sourceDatas.Add(rowData);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_usingTableView.itemsSource = sourceDatas;
|
||||||
_usingListView.Clear();
|
_usingTableView.RebuildView();
|
||||||
_usingListView.ClearSelection();
|
|
||||||
_usingListView.itemsSource = source;
|
|
||||||
_usingListView.Rebuild();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,8 @@
|
||||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
|
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
|
||||||
<ui:VisualElement name="TopGroup" style="flex-grow: 1; 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: 2px; margin-bottom: 1px; display: flex;">
|
<ui:VisualElement name="TopGroup" style="flex-grow: 1; 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: 2px; margin-bottom: 1px; display: flex;">
|
||||||
<uie:Toolbar name="TopBar" style="height: 25px; margin-left: 1px; margin-right: 1px;">
|
<YooAsset.Editor.TableView name="TopTableView" />
|
||||||
<uie:ToolbarButton text="Package Name" display-tooltip-when-elided="true" name="TopBar0" style="width: 150px; -unity-text-align: middle-left; flex-grow: 0;" />
|
|
||||||
<uie:ToolbarButton text="Bundle Name" display-tooltip-when-elided="true" name="TopBar1" style="width: 280px; -unity-text-align: middle-left; flex-grow: 1;" />
|
|
||||||
<uie:ToolbarButton text="Ref Count" display-tooltip-when-elided="true" name="TopBar3" style="width: 100px; -unity-text-align: middle-left;" />
|
|
||||||
<uie:ToolbarButton text="Status" display-tooltip-when-elided="true" name="TopBar4" style="width: 120px; -unity-text-align: middle-left;" />
|
|
||||||
</uie:Toolbar>
|
|
||||||
<ui:ListView focusable="true" name="TopListView" item-height="18" virtualization-method="DynamicHeight" style="flex-grow: 1;" />
|
|
||||||
</ui:VisualElement>
|
</ui:VisualElement>
|
||||||
<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;">
|
<YooAsset.Editor.TableView name="BottomTableView" />
|
||||||
<uie:ToolbarButton text="Using Assets" display-tooltip-when-elided="true" name="BottomBar1" style="width: 280px; -unity-text-align: middle-left; flex-grow: 1;" />
|
|
||||||
<uie:ToolbarButton text="Spawn Scene" display-tooltip-when-elided="true" name="BottomBar2" style="width: 150px; -unity-text-align: middle-left;" />
|
|
||||||
<uie:ToolbarButton text="Spawn Time" display-tooltip-when-elided="true" name="BottomBar3" style="width: 150px; -unity-text-align: middle-left;" />
|
|
||||||
<uie:ToolbarButton text="Ref Count" display-tooltip-when-elided="true" name="BottomBar4" style="width: 100px; -unity-text-align: middle-left;" />
|
|
||||||
<uie:ToolbarButton text="Status" display-tooltip-when-elided="true" name="BottomBar5" style="width: 120px; -unity-text-align: middle-left;" />
|
|
||||||
</uie:Toolbar>
|
|
||||||
<ui:ListView focusable="true" name="BottomListView" item-height="18" virtualization-method="DynamicHeight" style="flex-grow: 1;" />
|
|
||||||
</ui:VisualElement>
|
</ui:VisualElement>
|
||||||
</ui:UXML>
|
</ui:UXML>
|
||||||
|
|
|
@ -7,11 +7,6 @@ namespace YooAsset
|
||||||
[Serializable]
|
[Serializable]
|
||||||
internal class DebugBundleInfo : IComparer<DebugBundleInfo>, IComparable<DebugBundleInfo>
|
internal class DebugBundleInfo : IComparer<DebugBundleInfo>, IComparable<DebugBundleInfo>
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 包裹名
|
|
||||||
/// </summary>
|
|
||||||
public string PackageName { set; get; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 资源包名称
|
/// 资源包名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue