From b95d4a166adec17cfed20bcbb527e4a07ed609e0 Mon Sep 17 00:00:00 2001 From: hevinci Date: Fri, 18 Aug 2023 17:40:55 +0800 Subject: [PATCH] fix #138 --- .../Editor/AssetBundleCollector/AssetBundleCollector.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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;