update asset bundle collector

This commit is contained in:
hevinci
2023-09-25 16:53:03 +08:00
parent eb98eaeb3b
commit 054ee93360
3 changed files with 11 additions and 12 deletions

View File

@@ -155,7 +155,7 @@ namespace YooAsset.Editor
string[] findAssets = EditorTools.FindAssets(EAssetSearchType.All, collectDirectory);
foreach (string assetPath in findAssets)
{
if (IsValidateAsset(command, assetPath) && IsCollectAsset(assetPath))
if (IsValidateAsset(command, assetPath) && IsCollectAsset(group, assetPath))
{
if (result.ContainsKey(assetPath) == false)
{
@@ -172,7 +172,7 @@ namespace YooAsset.Editor
else
{
string assetPath = CollectPath;
if (IsValidateAsset(command, assetPath) && IsCollectAsset(assetPath))
if (IsValidateAsset(command, assetPath) && IsCollectAsset(group, assetPath))
{
var collectAssetInfo = CreateCollectAssetInfo(command, group, assetPath);
result.Add(assetPath, collectAssetInfo);
@@ -257,11 +257,11 @@ namespace YooAsset.Editor
return true;
}
private bool IsCollectAsset(string assetPath)
private bool IsCollectAsset(AssetBundleCollectorGroup group, string assetPath)
{
// 根据规则设置过滤资源文件
IFilterRule filterRuleInstance = AssetBundleCollectorSettingData.GetFilterRuleInstance(FilterRuleName);
return filterRuleInstance.IsCollectAsset(new FilterRuleData(assetPath));
return filterRuleInstance.IsCollectAsset(new FilterRuleData(assetPath, CollectPath, group.GroupName, UserData));
}
private string GetAddress(CollectCommand command, AssetBundleCollectorGroup group, string assetPath)
{