diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs index e0b19ed..813d7f1 100644 --- a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs +++ b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs @@ -340,11 +340,13 @@ namespace YooAsset.Editor List result = new List(depends.Length); foreach (string assetPath in depends) { + // 注意:排除主资源对象 + if (assetPath == mainAssetPath) + continue; + if (IsValidateAsset(assetPath, false)) { - // 注意:排除主资源对象 - if (assetPath != mainAssetPath) - result.Add(assetPath); + result.Add(assetPath); } } return result;