Unity-Technologies/UnityCsReference · error · BuildFailedException
Player build failed: {args.report.SummarizeErrors()}
Error message
Player build failed: {args.report.SummarizeErrors()} What it means
Thrown as a BuildFailedException (silent:true) by the Bee build postprocessor after a player build has completed but BeeDriverResult.Success is false. The message embeds args.report.SummarizeErrors(), aggregating all individual build errors from the build report. The 'silent' flag suppresses extra editor noise, surfacing only the summarized root causes.
Source
Thrown at Editor/Mono/Modules/BeeBuildPostprocessor.cs:920
BeeDriverResult = activeBuild.TaskObject.Result;
UnityBeeDriverProfilerSession.AddTaskToWaitForBeforeFinishing(BeeDriverResult.ProfileOutputWritingTask);
if (BeeDriverResult.Success)
{
PostProcessCompletedBuild(args);
}
ReportBuildResults();
UnityBeeDriver.RunCleanBeeCache();
if (BeeDriverResult.Success)
{
buildStep = args.report.BeginBuildStep("Report output files");
ReportBuildOutputFiles(args);
args.report.EndBuildStep(buildStep);
} else
throw new BuildFailedException($"Player build failed: {args.report.SummarizeErrors()}", silent: true);
}
}
catch (OperationCanceledException)
{
throw;
}
catch (BuildFailedException)
{
throw;
}
catch (AggregateException e)
{
if (e.InnerException is OperationCanceledException or BuildFailedException)
throw e.InnerException;
throw new BuildFailedException(e);
}
catch (Exception e)View on GitHub (pinned to 225b0fbdb5)
Solutions
- Run UnityBeeDriver.RunCleanBeeCache manually (or delete Library/Bee and Library/BeeArtifacts) and rebuild to eliminate stale cache.
- Read the full Editor.log / build report for the individual errors SummarizeErrors aggregated — the real cause is upstream, not this throw site.
- Verify the target platform's Build Tools / SDK / NDK are installed and the Unity editor version matches the module version.
- Disable 'Compress assets in the build' or switch compression format if the failure is asset-pipeline related.
Example fix
// before: build keeps failing on stale Bee artifacts // after: clean Bee cache then rebuild UnityBeeDriver.RunCleanBeeCache(); // or from command line: delete Library/Bee, Library/BeeArtifacts, then re-run the build
Defensive patterns
Strategy: try-catch
Validate before calling
// No pre-check possible; inspect build report after RunCleanBeeCache.
if (!UnityBeeDriver.RunCleanBeeCache())
Debug.LogError("Bee driver reported failure before throw."); Try / catch
try { /* invoke player build */ }
catch (BuildFailedException ex) when (ex.Message.StartsWith("Player build failed"))
{
// ex is silent:true; surface the aggregated report errors to the user/log
Debug.LogError(ex.Message);
} Prevention
- Clean Library/Bee and Library/BeeArtifacts before CI builds.
- Pin a single Unity editor + module version per CI image.
- Capture Editor.log to inspect SummarizeErrors output when this fires.
When it happens
Trigger: Calling PostProcessCompletedBuild followed by UnityBeeDriver.RunCleanBeeCache where the Bee driver returns a non-success result. Occurs during player export/build pipeline when Bee (Unity's native build system) fails a compilation, linking, or post-processing step.
Common situations: Bee cache corruption, missing native toolchain/SDK, incompatible script assemblies, out-of-disk-space during build, platform module not installed, or a prior build step logged errors into the build report that SummarizeErrors now reports.
Related errors
- Scene path "{0}" contains invalid directory separators.
- The build target does not support build appending.
- The build cannot be appended.
- Non-development build cannot allow debugging. Either add the
- Non-development build cannot allow code coverage. Either add
AI-assisted analysis of Unity-Technologies/UnityCsReference@225b0fbdb5 (2026-08-13).
Data as JSON: /api/errors/93f4abaa392031f2.
Report an issue: GitHub.