Update AssetBundleGrouper

pull/9/head
hevinci 2022-04-29 10:46:38 +08:00
parent 3de44a416c
commit c6440c9312
3 changed files with 5 additions and 11 deletions

View File

@ -17,17 +17,17 @@ namespace YooAsset.Editor
/// <summary> /// <summary>
/// 寻址规则类名 /// 寻址规则类名
/// </summary> /// </summary>
public string AddressRuleName = string.Empty; public string AddressRuleName = nameof(AddressByFileName);
/// <summary> /// <summary>
/// 打包规则类名 /// 打包规则类名
/// </summary> /// </summary>
public string PackRuleName = string.Empty; public string PackRuleName = nameof(PackDirectory);
/// <summary> /// <summary>
/// 过滤规则类名 /// 过滤规则类名
/// </summary> /// </summary>
public string FilterRuleName = string.Empty; public string FilterRuleName = nameof(CollectAll);
/// <summary> /// <summary>

View File

@ -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(); AssetBundleCollector collector = new AssetBundleCollector();
collector.CollectPath = collectPath; collector.CollectPath = collectPath;
collector.AddressRuleName = addressRuleName;
collector.PackRuleName = packRuleName;
collector.FilterRuleName = filterRuleName;
grouper.Collectors.Add(collector); grouper.Collectors.Add(collector);
IsDirty = true; IsDirty = true;
} }

View File

@ -522,10 +522,7 @@ namespace YooAsset.Editor
if (selectGrouper == null) if (selectGrouper == null)
return; return;
string addressRuleName = nameof(AddressByFileName); AssetBundleGrouperSettingData.CreateCollector(selectGrouper, string.Empty);
string packRuleName = nameof(PackDirectory);
string filterRuleName = nameof(CollectAll);
AssetBundleGrouperSettingData.CreateCollector(selectGrouper, string.Empty, addressRuleName, packRuleName, filterRuleName);
FillCollectorViewData(); FillCollectorViewData();
} }
private void RemoveCollectorBtn_clicked(AssetBundleCollector selectCollector) private void RemoveCollectorBtn_clicked(AssetBundleCollector selectCollector)