refactor : asset bundle reporter

pull/229/head
hevinci 2023-12-27 18:24:31 +08:00
parent cbdb84a69f
commit 9ebe92f832
1 changed files with 0 additions and 25 deletions

View File

@ -35,11 +35,6 @@ namespace YooAsset.Editor
/// 资源包视图 /// 资源包视图
/// </summary> /// </summary>
BundleView, BundleView,
/// <summary>
/// 冗余资源试图
/// </summary>
Redundancy,
} }
private ToolbarMenu _viewModeMenu; private ToolbarMenu _viewModeMenu;
@ -75,7 +70,6 @@ namespace YooAsset.Editor
_viewModeMenu.menu.AppendAction(EViewMode.Summary.ToString(), ViewModeMenuAction0, ViewModeMenuFun0); _viewModeMenu.menu.AppendAction(EViewMode.Summary.ToString(), ViewModeMenuAction0, ViewModeMenuFun0);
_viewModeMenu.menu.AppendAction(EViewMode.AssetView.ToString(), ViewModeMenuAction1, ViewModeMenuFun1); _viewModeMenu.menu.AppendAction(EViewMode.AssetView.ToString(), ViewModeMenuAction1, ViewModeMenuFun1);
_viewModeMenu.menu.AppendAction(EViewMode.BundleView.ToString(), ViewModeMenuAction2, ViewModeMenuFun2); _viewModeMenu.menu.AppendAction(EViewMode.BundleView.ToString(), ViewModeMenuAction2, ViewModeMenuFun2);
_viewModeMenu.menu.AppendAction(EViewMode.Redundancy.ToString(), ViewModeMenuAction3, ViewModeMenuFun3);
// 搜索栏 // 搜索栏
var searchField = root.Q<ToolbarSearchField>("SearchField"); var searchField = root.Q<ToolbarSearchField>("SearchField");
@ -166,18 +160,6 @@ namespace YooAsset.Editor
_bundleListViewer.AttachParent(root); _bundleListViewer.AttachParent(root);
} }
} }
private void ViewModeMenuAction3(DropdownMenuAction action)
{
if (_viewMode != EViewMode.Redundancy)
{
_viewMode = EViewMode.Redundancy;
VisualElement root = this.rootVisualElement;
_viewModeMenu.text = EViewMode.Redundancy.ToString();
_summaryViewer.DetachParent();
_assetListViewer.DetachParent();
_bundleListViewer.DetachParent();
}
}
private DropdownMenuAction.Status ViewModeMenuFun0(DropdownMenuAction action) private DropdownMenuAction.Status ViewModeMenuFun0(DropdownMenuAction action)
{ {
if (_viewMode == EViewMode.Summary) if (_viewMode == EViewMode.Summary)
@ -199,13 +181,6 @@ namespace YooAsset.Editor
else else
return DropdownMenuAction.Status.Normal; return DropdownMenuAction.Status.Normal;
} }
private DropdownMenuAction.Status ViewModeMenuFun3(DropdownMenuAction action)
{
if (_viewMode == EViewMode.Redundancy)
return DropdownMenuAction.Status.Checked;
else
return DropdownMenuAction.Status.Normal;
}
} }
} }
#endif #endif