From da3e29a7129c33a8236b77b13052282e84cbf98d Mon Sep 17 00:00:00 2001 From: yuliuren <1464576565@qq.com> Date: Thu, 31 Jul 2025 21:48:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Editor/Build/BuildCLI/AppB?= =?UTF-8?q?uildHelper.cs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/Build/BuildCLI/AppBuildHelper.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Editor/Build/BuildCLI/AppBuildHelper.cs b/Editor/Build/BuildCLI/AppBuildHelper.cs index b40e506..304ec3b 100644 --- a/Editor/Build/BuildCLI/AppBuildHelper.cs +++ b/Editor/Build/BuildCLI/AppBuildHelper.cs @@ -54,7 +54,22 @@ public static class AppBuildHelper } else { - Debug.Log($"错误信息: {report.SummarizeErrors()}"); +#if UNITY_2023_1_OR_NEWER + Debug.LogError(report.SummarizeErrors()); +#else + var errors = new List(); + foreach (var step in report.steps) + { + foreach (var msg in step.messages) + { + if (msg.type == LogType.Error || msg.type == LogType.Exception) + { + errors.Add($"[Step: {step.name}] {msg.content}"); + } + } + } + Debug.LogError($"构建失败,错误信息:\n{string.Join("\n", errors)}"); +#endif } } }