From 6d2627635291c77ab5e76844886b374672fd9d46 Mon Sep 17 00:00:00 2001 From: hevinci Date: Fri, 24 Jun 2022 17:03:27 +0800 Subject: [PATCH] Update AssetBundleDebuggerWindow.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复了AssetView和BundleView切换失败的问题。 --- .../AssetBundleDebuggerWindow.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs index 4ba9591..38f83cf 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs @@ -188,8 +188,21 @@ namespace YooAsset.Editor _viewMode = viewMode; VisualElement root = this.rootVisualElement; _viewModeMenu.text = viewMode.ToString(); - _assetListViewer.AttachParent(root); - _bundleListViewer.DetachParent(); + + if (viewMode == EViewMode.AssetView) + { + _assetListViewer.AttachParent(root); + _bundleListViewer.DetachParent(); + } + else if (viewMode == EViewMode.BundleView) + { + _assetListViewer.DetachParent(); + _bundleListViewer.AttachParent(root); + } + else + { + throw new NotImplementedException(viewMode.ToString()); + } } } private DropdownMenuAction.Status ViewModeMenuFun(DropdownMenuAction action)