From d190bc35b46f37397b7155f78c74f7992f4c3203 Mon Sep 17 00:00:00 2001 From: hevinci Date: Tue, 15 Mar 2022 22:30:46 +0800 Subject: [PATCH] Update AssetBundleBrowser --- .../AssetBundleBrowserWindow.cs | 36 ++++++++++++------- ...istViewer.cs => AssetListBrowserViewer.cs} | 24 ++++++------- ...cs.meta => AssetListBrowserViewer.cs.meta} | 0 ...iewer.uxml => AssetListBrowserViewer.uxml} | 0 ....meta => AssetListBrowserViewer.uxml.meta} | 0 ...stViewer.cs => BundleListBrowserViewer.cs} | 24 ++++++------- ...s.meta => BundleListBrowserViewer.cs.meta} | 0 ...ewer.uxml => BundleListBrowserViewer.uxml} | 0 ...meta => BundleListBrowserViewer.uxml.meta} | 0 9 files changed, 47 insertions(+), 37 deletions(-) rename Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/{AssetListViewer.cs => AssetListBrowserViewer.cs} (94%) rename Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/{AssetListViewer.cs.meta => AssetListBrowserViewer.cs.meta} (100%) rename Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/{AssetListViewer.uxml => AssetListBrowserViewer.uxml} (100%) rename Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/{AssetListViewer.uxml.meta => AssetListBrowserViewer.uxml.meta} (100%) rename Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/{BundleListViewer.cs => BundleListBrowserViewer.cs} (94%) rename Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/{BundleListViewer.cs.meta => BundleListBrowserViewer.cs.meta} (100%) rename Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/{BundleListViewer.uxml => BundleListBrowserViewer.uxml} (100%) rename Assets/YooAsset/Editor/AssetBundleBrowser/VisualViewers/{BundleListViewer.uxml.meta => BundleListBrowserViewer.uxml.meta} (100%) diff --git a/Assets/YooAsset/Editor/AssetBundleBrowser/AssetBundleBrowserWindow.cs b/Assets/YooAsset/Editor/AssetBundleBrowser/AssetBundleBrowserWindow.cs index f2f7637..839b2c4 100644 --- a/Assets/YooAsset/Editor/AssetBundleBrowser/AssetBundleBrowserWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleBrowser/AssetBundleBrowserWindow.cs @@ -15,19 +15,29 @@ namespace YooAsset.Editor public static void ShowExample() { AssetBundleBrowserWindow wnd = GetWindow(); - wnd.titleContent = new GUIContent("资源包浏览工具"); + wnd.titleContent = new GUIContent("璧勬簮鍖呮祻瑙堝伐鍏"); wnd.minSize = new Vector2(800, 600); } + /// + /// 鏄剧ず妯″紡 + /// private enum EShowMode { + /// + /// 璧勬簮瀵硅薄鍒楄〃鏄剧ず妯″紡 + /// AssetList, + + /// + /// 璧勬簮鍖呭垪琛ㄦ樉绀烘ā寮 + /// BundleList, } private ToolbarMenu _showModeMenu; - private AssetListViewer _assetListViewer; - private BundleListViewer _bundleListViewer; + private AssetListBrowserViewer _assetListViewer; + private BundleListBrowserViewer _bundleListViewer; private EShowMode _showMode; private string _searchKeyWord; @@ -38,7 +48,7 @@ namespace YooAsset.Editor { VisualElement root = this.rootVisualElement; - // 加载布局文件 + // 鍔犺浇甯冨眬鏂囦欢 string uxml = "Assets/YooAsset/Editor/AssetBundleBrowser/AssetBundleBrowser.uxml"; var visualAsset = AssetDatabase.LoadAssetAtPath(uxml); if (visualAsset == null) @@ -48,28 +58,28 @@ namespace YooAsset.Editor } visualAsset.CloneTree(root); - // 导入按钮 + // 瀵煎叆鎸夐挳 var importBtn = root.Q