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>
public string AddressRuleName = string.Empty;
public string AddressRuleName = nameof(AddressByFileName);
/// <summary>
/// 打包规则类名
/// </summary>
public string PackRuleName = string.Empty;
public string PackRuleName = nameof(PackDirectory);
/// <summary>
/// 过滤规则类名
/// </summary>
public string FilterRuleName = string.Empty;
public string FilterRuleName = nameof(CollectAll);
/// <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();
collector.CollectPath = collectPath;
collector.AddressRuleName = addressRuleName;
collector.PackRuleName = packRuleName;
collector.FilterRuleName = filterRuleName;
grouper.Collectors.Add(collector);
IsDirty = true;
}

View File

@ -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)