From 7ded7eb2ff12af85c9e6016c3a91456309d4ad3a Mon Sep 17 00:00:00 2001 From: hevinci Date: Wed, 16 Mar 2022 00:01:23 +0800 Subject: [PATCH] Update AssetBundleDebugger --- .../Editor/AssetBundleDebugger/AssetBundleDebugger.uxml | 2 +- .../AssetBundleDebugger/AssetBundleDebuggerWindow.cs | 5 +++-- .../VisualViewers/AssetListDebuggerViewer.cs | 7 ++++--- .../VisualViewers/AssetListDebuggerViewer.uxml | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebugger.uxml b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebugger.uxml index b0f3d16..69a6761 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebugger.uxml +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebugger.uxml @@ -2,6 +2,6 @@ - + diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs index b273163..71e962b 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs @@ -25,7 +25,8 @@ namespace YooAsset.Editor VisualElement root = rootVisualElement; // 加载布局文件 - string uxml = "Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebugger.uxml"; + string rootPath = EditorTools.GetYooAssetPath(); + string uxml = $"{rootPath}/Editor/AssetBundleDebugger/AssetBundleDebugger.uxml"; var visualAsset = AssetDatabase.LoadAssetAtPath(uxml); if (visualAsset == null) { @@ -39,7 +40,7 @@ namespace YooAsset.Editor sampleBtn.clicked += SampleBtn_onClick; // 搜索栏 - var searchField = root.Q("SearchField"); + var searchField = root.Q("SearchField"); searchField.RegisterValueChangedCallback(OnSearchKeyWordChange); // 加载页面 diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.cs index 836a6b2..5e955d5 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.cs +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.cs @@ -24,7 +24,8 @@ namespace YooAsset.Editor public void InitViewer() { // 加载布局文件 - string uxml = "Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.uxml"; + string rootPath = EditorTools.GetYooAssetPath(); + string uxml = $"{rootPath}/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.uxml"; _visualAsset = AssetDatabase.LoadAssetAtPath(uxml); if (_visualAsset == null) { @@ -187,7 +188,7 @@ namespace YooAsset.Editor label.style.unityTextAlign = TextAnchor.MiddleLeft; label.style.marginLeft = 3f; //label.style.flexGrow = 1f; - label.style.width = 250; + label.style.width = 100; element.Add(label); } @@ -197,7 +198,7 @@ namespace YooAsset.Editor label.style.unityTextAlign = TextAnchor.MiddleLeft; label.style.marginLeft = 3f; //label.style.flexGrow = 1f; - label.style.width = 150; + label.style.width = 120; element.Add(label); } diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.uxml b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.uxml index 9dd0ed7..1e3737a 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.uxml +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.uxml @@ -10,7 +10,7 @@ - +