diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.cs index 1a6dbc5..6021e82 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.cs +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.cs @@ -58,7 +58,9 @@ namespace YooAsset.Editor { _debugReport = debugReport; _assetListView.Clear(); + _assetListView.ClearSelection(); _assetListView.itemsSource = FilterViewItems(debugReport, searchKeyWord); + _assetListView.Rebuild(); } private List FilterViewItems(DebugReport debugReport, string searchKeyWord) { @@ -250,6 +252,7 @@ namespace YooAsset.Editor _dependListView.Clear(); _dependListView.ClearSelection(); _dependListView.itemsSource = providerInfo.BundleInfos; + _dependListView.Rebuild(); } } } diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.uxml b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.uxml index 1faec8e..137adaa 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.uxml +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/AssetListDebuggerViewer.uxml @@ -7,7 +7,7 @@ - + @@ -15,6 +15,6 @@ - + diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/BundleListDebuggerViewer.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/BundleListDebuggerViewer.cs index 60fff10..733cb7d 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/BundleListDebuggerViewer.cs +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/BundleListDebuggerViewer.cs @@ -58,7 +58,9 @@ namespace YooAsset.Editor { _debugReport = debugReport; _bundleListView.Clear(); + _bundleListView.ClearSelection(); _bundleListView.itemsSource = FilterViewItems(debugReport, searchKeyWord); + _bundleListView.Rebuild(); } private List FilterViewItems(DebugReport debugReport, string searchKeyWord) { @@ -250,10 +252,7 @@ namespace YooAsset.Editor label5.text = providerInfo.Status.ToString(); } private void FillUsingListView(string bundleName) - { - _usingListView.Clear(); - _usingListView.ClearSelection(); - + { List source = new List(); foreach (var providerInfo in _debugReport.ProviderInfos) { @@ -266,7 +265,11 @@ namespace YooAsset.Editor } } } + + _usingListView.Clear(); + _usingListView.ClearSelection(); _usingListView.itemsSource = source; + _usingListView.Rebuild(); } } } diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/BundleListDebuggerViewer.uxml b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/BundleListDebuggerViewer.uxml index a66b0f1..0e6ab0a 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/BundleListDebuggerViewer.uxml +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/BundleListDebuggerViewer.uxml @@ -5,7 +5,7 @@ - + @@ -15,6 +15,6 @@ - + diff --git a/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleCollector.cs b/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleCollector.cs index 93b31d0..895ebcb 100644 --- a/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleCollector.cs +++ b/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleCollector.cs @@ -34,6 +34,9 @@ namespace YooAsset.Editor /// public string AssetTags = string.Empty; + [NonSerialized] + public object UserData; + /// /// 检测配置错误 diff --git a/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperWindow.cs b/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperWindow.cs index 274b084..e65adfa 100644 --- a/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperWindow.cs @@ -22,7 +22,7 @@ namespace YooAsset.Editor private List _packRuleList; private List _filterRuleList; private ListView _grouperListView; - private ListView _collectorListView; + private ScrollView _collectorScrollView; private Toggle _autoCollectShaderToogle; private TextField _shaderBundleNameTxt; private TextField _grouperNameTxt; @@ -61,7 +61,7 @@ namespace YooAsset.Editor _autoCollectShaderToogle.RegisterValueChangedCallback(evt => { AssetBundleGrouperSettingData.ModifyShader(evt.newValue, _shaderBundleNameTxt.value); - _shaderBundleNameTxt.SetEnabled(evt.newValue); + _shaderBundleNameTxt.SetEnabled(evt.newValue); }); _shaderBundleNameTxt = root.Q("ShaderBundleName"); _shaderBundleNameTxt.RegisterValueChangedCallback(evt => @@ -126,22 +126,15 @@ namespace YooAsset.Editor }); // 收集列表相关 - _collectorListView = root.Q("CollectorListView"); - _collectorListView.makeItem = MakeCollectorListViewItem; - _collectorListView.bindItem = BindCollectorListViewItem; -#if UNITY_2020_1_OR_NEWER - _collectorListView.onSelectionChange += CollectorListView_onSelectionChange; -#else - _collectorListView.onSelectionChanged += CollectorListView_onSelectionChange; -#endif + _collectorScrollView = root.Q("CollectorScrollView"); + _collectorScrollView.style.height = new Length(100, LengthUnit.Percent); + _collectorScrollView.viewDataKey = "scrollView"; - // 收集添加删除按钮 + // 收集器创建按钮 var collectorAddContainer = root.Q("CollectorAddContainer"); { var addBtn = collectorAddContainer.Q