Update AssetBundleDebuggerWindow.cs

修复了AssetView和BundleView切换失败的问题。
pull/17/head
hevinci 2022-06-24 17:03:27 +08:00
parent bdca693413
commit 6d26276352
1 changed files with 15 additions and 2 deletions

View File

@ -188,8 +188,21 @@ namespace YooAsset.Editor
_viewMode = viewMode; _viewMode = viewMode;
VisualElement root = this.rootVisualElement; VisualElement root = this.rootVisualElement;
_viewModeMenu.text = viewMode.ToString(); _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) private DropdownMenuAction.Status ViewModeMenuFun(DropdownMenuAction action)