Update AssetBundleDebugger

pull/4/head
hevinci 2022-03-16 11:03:23 +08:00
parent d0dc6ba9c6
commit 8fd39db9ce
2 changed files with 11 additions and 11 deletions

View File

@ -16,7 +16,7 @@ namespace YooAsset.Editor
} }
private AssetListDebuggerViewer _assetListViewer; private AssetListDebuggerViewer _assetListViewer;
private readonly DebugSummy _summy = new DebugSummy(); private readonly DebugReport _debugReport = new DebugReport();
private string _searchKeyWord; private string _searchKeyWord;
@ -52,13 +52,13 @@ namespace YooAsset.Editor
} }
private void SampleBtn_onClick() private void SampleBtn_onClick()
{ {
YooAssets.GetDebugSummy(_summy); YooAssets.GetDebugReport(_debugReport);
_assetListViewer.FillViewData(_summy, _searchKeyWord); _assetListViewer.FillViewData(_debugReport, _searchKeyWord);
} }
private void OnSearchKeyWordChange(ChangeEvent<string> e) private void OnSearchKeyWordChange(ChangeEvent<string> e)
{ {
_searchKeyWord = e.newValue; _searchKeyWord = e.newValue;
_assetListViewer.FillViewData(_summy, _searchKeyWord); _assetListViewer.FillViewData(_debugReport, _searchKeyWord);
} }
} }
} }

View File

@ -16,7 +16,7 @@ namespace YooAsset.Editor
private ListView _assetListView; private ListView _assetListView;
private ListView _dependListView; private ListView _dependListView;
private DebugSummy _summy; private DebugReport _debugReport;
/// <summary> /// <summary>
/// 初始化页面 /// 初始化页面
@ -54,16 +54,16 @@ namespace YooAsset.Editor
/// <summary> /// <summary>
/// 填充页面数据 /// 填充页面数据
/// </summary> /// </summary>
public void FillViewData(DebugSummy summy, string searchKeyWord) public void FillViewData(DebugReport debugReport, string searchKeyWord)
{ {
_summy = summy; _debugReport = debugReport;
_assetListView.Clear(); _assetListView.Clear();
_assetListView.itemsSource = FilterViewItems(summy, searchKeyWord); _assetListView.itemsSource = FilterViewItems(debugReport, searchKeyWord);
} }
private List<DebugProviderInfo> FilterViewItems(DebugSummy summy, string searchKeyWord) private List<DebugProviderInfo> FilterViewItems(DebugReport debugReport, string searchKeyWord)
{ {
var result = new List<DebugProviderInfo>(summy.ProviderInfos.Count); var result = new List<DebugProviderInfo>(debugReport.ProviderInfos.Count);
foreach (var providerInfo in summy.ProviderInfos) foreach (var providerInfo in debugReport.ProviderInfos)
{ {
if(string.IsNullOrEmpty(searchKeyWord) == false) if(string.IsNullOrEmpty(searchKeyWord) == false)
{ {