diff --git a/Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/AssetListBrowserViewer.cs b/Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/AssetListBrowserViewer.cs index 4094581..ec58287 100644 --- a/Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/AssetListBrowserViewer.cs +++ b/Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/AssetListBrowserViewer.cs @@ -14,6 +14,12 @@ namespace YooAsset.Editor private VisualTreeAsset _visualAsset; private TemplateContainer _root; + private ToolbarButton _topBar1; + private ToolbarButton _topBar2; + private ToolbarButton _topBar3; + private ToolbarButton _bottomBar1; + private ToolbarButton _bottomBar2; + private ToolbarButton _bottomBar3; private ListView _assetListView; private ListView _dependListView; private PatchManifest _manifest; @@ -35,6 +41,19 @@ namespace YooAsset.Editor _root = _visualAsset.CloneTree(); _root.style.flexGrow = 1f; + // 顶部按钮栏 + _topBar1 = _root.Q("TopBar1"); + _topBar2 = _root.Q("TopBar2"); + _topBar3 = _root.Q("TopBar3"); + _topBar1.clicked += TopBar1_clicked; + _topBar2.clicked += TopBar2_clicked; + _topBar3.clicked += TopBar3_clicked; + + // 底部按钮栏 + _bottomBar1 = _root.Q("BottomBar1"); + _bottomBar2 = _root.Q("BottomBar2"); + _bottomBar3 = _root.Q("BottomBar3"); + // 资源列表 _assetListView = _root.Q("TopListView"); _assetListView.makeItem = MakeAssetListViewItem; @@ -59,6 +78,7 @@ namespace YooAsset.Editor _manifest = manifest; _assetListView.Clear(); _assetListView.itemsSource = FilterViewItems(manifest, searchKeyWord); + _topBar1.text = $"Asset Path ({_assetListView.itemsSource.Count})"; } private List FilterViewItems(PatchManifest manifest, string searchKeyWord) { @@ -156,6 +176,15 @@ namespace YooAsset.Editor FillDependListView(patchAsset); } } + private void TopBar1_clicked() + { + } + private void TopBar2_clicked() + { + } + private void TopBar3_clicked() + { + } // 依赖列表相关 private VisualElement MakeDependListViewItem() @@ -229,6 +258,7 @@ namespace YooAsset.Editor _dependListView.ClearSelection(); #endif _dependListView.itemsSource = bundles; + _bottomBar1.text = $"Depend Bundles ({bundles.Count})"; } private string GetAssetFileSize(string assetPath) diff --git a/Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/BundleListBrowserViewer.cs b/Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/BundleListBrowserViewer.cs index bba4a88..9c26978 100644 --- a/Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/BundleListBrowserViewer.cs +++ b/Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/BundleListBrowserViewer.cs @@ -14,6 +14,14 @@ namespace YooAsset.Editor private VisualTreeAsset _visualAsset; private TemplateContainer _root; + private ToolbarButton _topBar1; + private ToolbarButton _topBar2; + private ToolbarButton _topBar3; + private ToolbarButton _topBar4; + private ToolbarButton _topBar5; + private ToolbarButton _bottomBar1; + private ToolbarButton _bottomBar2; + private ToolbarButton _bottomBar3; private ListView _bundleListView; private ListView _includeListView; private PatchManifest _manifest; @@ -35,6 +43,18 @@ namespace YooAsset.Editor _root = _visualAsset.CloneTree(); _root.style.flexGrow = 1f; + // 顶部按钮栏 + _topBar1 = _root.Q("TopBar1"); + _topBar2 = _root.Q("TopBar2"); + _topBar3 = _root.Q("TopBar3"); + _topBar4 = _root.Q("TopBar4"); + _topBar5 = _root.Q("TopBar5"); + + // 底部按钮栏 + _bottomBar1 = _root.Q("BottomBar1"); + _bottomBar2 = _root.Q("BottomBar2"); + _bottomBar3 = _root.Q("BottomBar3"); + // 资源包列表 _bundleListView = _root.Q("TopListView"); _bundleListView.makeItem = MakeBundleListViewItem; @@ -59,6 +79,7 @@ namespace YooAsset.Editor _manifest = manifest; _bundleListView.Clear(); _bundleListView.itemsSource = FilterViewItems(manifest, searchKeyWord); + _topBar1.text = $"Bundle Name ({_bundleListView.itemsSource.Count})"; } private List FilterViewItems(PatchManifest manifest, string searchKeyWord) { @@ -269,6 +290,7 @@ namespace YooAsset.Editor _includeListView.ClearSelection(); #endif _includeListView.itemsSource = containsList; + _bottomBar1.text = $"Include Assets ({containsList.Count})"; } private string GetAssetFileSize(string assetPath)