From 830eb7c460e55a919cf04be13627aa77e9395955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=AC=E6=98=A5=E9=B9=8F?= Date: Thu, 5 Jun 2025 11:07:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E6=98=BE=E7=A4=BA=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E8=BF=87=E7=9A=84=E6=9D=A1=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssetBundleCollectorWindow.cs | 43 ++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs index 98912e5f..f794ac05 100644 --- a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs @@ -75,6 +75,8 @@ namespace YooAsset.Editor private int _lastModifyGroupIndex = 0; private bool _showGlobalSettings = false; private bool _showPackageSettings = false; + + private List _displayGroupList; public void CreateGUI() @@ -748,10 +750,47 @@ namespace YooAsset.Editor var selectPackage = _packageListView.selectedItem as AssetBundleCollectorPackage; if (selectPackage == null) return; + + if(_viewMode == EViewMode.Search) + { + _displayGroupList = new List(); + foreach(var group in selectPackage.Groups) + { + if(group.GroupName.ToLower().Contains(_lowerSearchKey)) + { + _displayGroupList.Add(group); + } + else if(group.AssetTags.ToLower().Contains(_lowerSearchKey)) + { + _displayGroupList.Add(group); + } + else + { + foreach(var collector in group.Collectors) + { + if(collector.CollectPath.ToLower().Contains(_lowerSearchKey)) + { + _displayGroupList.Add(group); + break; + } + + if(collector.AssetTags.ToLower().Contains(_lowerSearchKey)) + { + _displayGroupList.Add(group); + break; + } + } + } + } + } + else + { + _displayGroupList = selectPackage.Groups; + } _groupListView.Clear(); _groupListView.ClearSelection(); - _groupListView.itemsSource = selectPackage.Groups; + _groupListView.itemsSource = _displayGroupList; _groupListView.Rebuild(); if (_lastModifyGroupIndex >= 0 && _lastModifyGroupIndex < _groupListView.itemsSource.Count) @@ -780,7 +819,7 @@ namespace YooAsset.Editor if (selectPackage == null) return; - var group = selectPackage.Groups[index]; + var group = _displayGroupList[index]; var textField1 = element.Q