From ac0112199da26059b12df589372f80f3c712b716 Mon Sep 17 00:00:00 2001 From: hevinci Date: Mon, 6 Mar 2023 20:18:41 +0800 Subject: [PATCH] update asset bundle builder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复了SBP打包,如果包含内置资源会打包失败的问题。 --- .../BuildTasks/TaskCreatePatchManifest.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchManifest.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchManifest.cs index 26237ed..ee77076 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchManifest.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreatePatchManifest.cs @@ -257,7 +257,10 @@ namespace YooAsset.Editor foreach (var patchBundle in patchManifest.BundleList) { if (patchBundle.IsRawFile) + { + _cachedBundleDepends.Add(patchBundle.BundleName, new string[] { }); continue; + } if (buildResultContext.Results.BundleInfos.ContainsKey(patchBundle.BundleName) == false) throw new Exception($"Not found bundle in SBP build results : {patchBundle.BundleName}"); @@ -297,6 +300,12 @@ namespace YooAsset.Editor progressValue = 0; foreach (var patchBundle in patchManifest.BundleList) { + if (patchBundle.IsRawFile) + { + _cachedBundleDepends.Add(patchBundle.BundleName, new string[] { } ); + continue; + } + var depends = buildResultContext.UnityManifest.GetDirectDependencies(patchBundle.BundleName); _cachedBundleDepends.Add(patchBundle.BundleName, depends); EditorTools.DisplayProgressBar("缓存资源包依赖列表", ++progressValue, totalCount);