This commit is contained in:
陈思海 2025-08-01 19:36:01 +08:00
commit a655c457e2

View File

@ -64,7 +64,22 @@ public static class AppBuildHelper
} }
else else
{ {
Debug.Log($"错误信息: {report.SummarizeErrors()}"); #if UNITY_2023_1_OR_NEWER
Debug.LogError(report.SummarizeErrors());
#else
var errors = new List<string>();
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
} }
} }
} }