From af29cb738d257b38db2fb547210df70ddc0583af Mon Sep 17 00:00:00 2001 From: hevinci Date: Wed, 14 Sep 2022 17:36:41 +0800 Subject: [PATCH] Update AssetBundleBuilder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 对内置管线构建结果做容错处理 --- .../Editor/AssetBundleBuilder/BuildTasks/TaskBuilding.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskBuilding.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskBuilding.cs index 375384b..ae47991 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskBuilding.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskBuilding.cs @@ -30,6 +30,13 @@ namespace YooAsset.Editor if (buildResults == null) throw new Exception("构建过程中发生错误!"); + if (buildMode == EBuildMode.ForceRebuild || buildMode == EBuildMode.IncrementalBuild) + { + string unityOutputManifestFilePath = $"{buildParametersContext.PipelineOutputDirectory}/{YooAssetSettings.OutputFolderName}"; + if(System.IO.File.Exists(unityOutputManifestFilePath) == false) + throw new Exception("构建过程中发生严重错误!请查阅上下文日志!"); + } + BuildRunner.Log("Unity引擎打包成功!"); BuildResultContext buildResultContext = new BuildResultContext(); buildResultContext.UnityManifest = buildResults;