mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-23 17:20:12 +00:00
Update asset bundle reporter window
更新构建报告窗口:增加预览AssetBundle文件内容的功能。
This commit is contained in:
@@ -42,8 +42,9 @@ namespace YooAsset.Editor
|
||||
private BundleListReporterViewer _bundleListViewer;
|
||||
|
||||
private EViewMode _viewMode;
|
||||
private string _searchKeyWord;
|
||||
private BuildReport _buildReport;
|
||||
private string _reportFilePath;
|
||||
private string _searchKeyWord;
|
||||
|
||||
|
||||
public void CreateGUI()
|
||||
@@ -92,6 +93,10 @@ namespace YooAsset.Editor
|
||||
_viewModeMenu.text = EViewMode.Summary.ToString();
|
||||
_summaryViewer.AttachParent(root);
|
||||
}
|
||||
public void OnDestroy()
|
||||
{
|
||||
AssetBundleRecorder.UnloadAll();
|
||||
}
|
||||
|
||||
private void ImportBtn_onClick()
|
||||
{
|
||||
@@ -99,19 +104,20 @@ namespace YooAsset.Editor
|
||||
if (string.IsNullOrEmpty(selectFilePath))
|
||||
return;
|
||||
|
||||
string jsonData = FileUtility.ReadFile(selectFilePath);
|
||||
_reportFilePath = selectFilePath;
|
||||
string jsonData = FileUtility.ReadFile(_reportFilePath);
|
||||
_buildReport = BuildReport.Deserialize(jsonData);
|
||||
_assetListViewer.FillViewData(_buildReport, _searchKeyWord);
|
||||
_bundleListViewer.FillViewData(_buildReport, _searchKeyWord);
|
||||
_bundleListViewer.FillViewData(_buildReport, _reportFilePath, _searchKeyWord);
|
||||
_summaryViewer.FillViewData(_buildReport);
|
||||
}
|
||||
private void OnSearchKeyWordChange(ChangeEvent<string> e)
|
||||
{
|
||||
_searchKeyWord = e.newValue;
|
||||
if(_buildReport != null)
|
||||
if (_buildReport != null)
|
||||
{
|
||||
_assetListViewer.FillViewData(_buildReport, _searchKeyWord);
|
||||
_bundleListViewer.FillViewData(_buildReport, _searchKeyWord);
|
||||
_bundleListViewer.FillViewData(_buildReport, _reportFilePath, _searchKeyWord);
|
||||
}
|
||||
}
|
||||
private void ViewModeMenuAction0(DropdownMenuAction action)
|
||||
|
||||
Reference in New Issue
Block a user