From c6440c9312b1beb689cd464b1426fe781af21b93 Mon Sep 17 00:00:00 2001 From: hevinci Date: Fri, 29 Apr 2022 10:46:38 +0800 Subject: [PATCH] Update AssetBundleGrouper --- .../Editor/AssetBundleGrouper/AssetBundleCollector.cs | 6 +++--- .../AssetBundleGrouper/AssetBundleGrouperSettingData.cs | 5 +---- .../Editor/AssetBundleGrouper/AssetBundleGrouperWindow.cs | 5 +---- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleCollector.cs b/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleCollector.cs index a534a2e..3afda69 100644 --- a/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleCollector.cs +++ b/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleCollector.cs @@ -17,17 +17,17 @@ namespace YooAsset.Editor /// /// 寻址规则类名 /// - public string AddressRuleName = string.Empty; + public string AddressRuleName = nameof(AddressByFileName); /// /// 打包规则类名 /// - public string PackRuleName = string.Empty; + public string PackRuleName = nameof(PackDirectory); /// /// 过滤规则类名 /// - public string FilterRuleName = string.Empty; + public string FilterRuleName = nameof(CollectAll); /// diff --git a/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperSettingData.cs b/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperSettingData.cs index 4022498..9e32ca1 100644 --- a/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperSettingData.cs +++ b/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperSettingData.cs @@ -323,13 +323,10 @@ namespace YooAsset.Editor } // 资源收集器编辑相关 - public static void CreateCollector(AssetBundleGrouper grouper, string collectPath, string addressRuleName, string packRuleName, string filterRuleName) + public static void CreateCollector(AssetBundleGrouper grouper, string collectPath) { AssetBundleCollector collector = new AssetBundleCollector(); collector.CollectPath = collectPath; - collector.AddressRuleName = addressRuleName; - collector.PackRuleName = packRuleName; - collector.FilterRuleName = filterRuleName; grouper.Collectors.Add(collector); IsDirty = true; } diff --git a/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperWindow.cs b/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperWindow.cs index 2b511c9..1846cbb 100644 --- a/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperWindow.cs @@ -522,10 +522,7 @@ namespace YooAsset.Editor if (selectGrouper == null) return; - string addressRuleName = nameof(AddressByFileName); - string packRuleName = nameof(PackDirectory); - string filterRuleName = nameof(CollectAll); - AssetBundleGrouperSettingData.CreateCollector(selectGrouper, string.Empty, addressRuleName, packRuleName, filterRuleName); + AssetBundleGrouperSettingData.CreateCollector(selectGrouper, string.Empty); FillCollectorViewData(); } private void RemoveCollectorBtn_clicked(AssetBundleCollector selectCollector)