diff --git a/Editor/Build/BuildCLI/AppBuildHelper.cs b/Editor/Build/BuildCLI/AppBuildHelper.cs index c57b21e..3afb1d1 100644 --- a/Editor/Build/BuildCLI/AppBuildHelper.cs +++ b/Editor/Build/BuildCLI/AppBuildHelper.cs @@ -64,7 +64,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 } } }