Documentation

​
​

Development

User Acquisition

Monetization

Industry

Build Automation

DevOps

Build Automation REST API

Build Automation Editor Package

Open Unity Dashboard

Build Automation

​
​
Build Automation
  • Overview
  • Get started with Build Automation
  • Build Automation Glossary
  • Build configuration
  • Advanced build configuration
  • Run builds
  • Build results
    • Check build results
    • Troubleshooting Build Automation failures
      • Troubleshoot common issues
      • Builds fail immediately
      • Unrecognized project error
      • Clone hangs when you use Git submodules
      • Lightmap baking
      • Android build failures
      • Errors after migration to a new Xcode version
      • macOS notarization failure
      • Problems with iOS Build Automation during XCode export
      • iOS build can't download or install from Unity Build Automation
  • Optimize build speed
  • Manage artifact retention rules
  • Manage concurrent builds
  • Sign build artifacts
  • Build Automation integrations
  • Build Automation API
  • Build Automation Editor Package
  • Reference
  1. Unity Build Automation
  2. Build results
  3. Troubleshoot Build Automation failures

Troubleshoot common issues

Solve common issues with Build Automation failures.
Read time 3 minutes
Last updated 10 months ago

Check the logs for errors

The first step to troubleshoot any Unity Build Automation (UBA) failure is to check the error logs.
The UBA logs highlight error messages in red and warnings in yellow to improve visibility. UBA also collects any warning and error messages in a compact log tab to make them easier to find, although not all failures are recorded in the compact log so it can be helpful to check the full log. If there are multiple error logs and you have a previous build that was successful, you can compare the logs to filter out any errors that might be present in the successful run.

Run a clean build

UBA builds that cache either the library or the workspace folders can cause issues. To force the target to ignore the cache, use the Clean Build option when you trigger the build.

Run locally in batch mode

If the project builds successfully in the editor but fails to build through Unity Build Automation, it might be because you use batch mode to generate the build. To find out if the error reproduces, you can try to run in batch mode locally
First, you need to either delete the
Library
folder or check out the source code into a new fresh folder, which forces UBA a re-download of the packages. This simulates the UBA build server's behavior that checks out the source code on every build.
Here's a Windows and macOS version of the same command.
Note
Several of these flags are not required. If you don't want to run unit tests, you can skip the flags such as the
-testPlatform
,
-testResults
, and
-runTests
.
The directories provided are the default installation folders for the Unity Editor; adjust them according to the correct path on your local machine.

Windows CMD console

"C:\Program Files\Unity\Hub\Editor\{UNITY_VERSION}\Editor\unity.exe" -batchMode -skipMissingProjectID -skipMissingUPID -buildTarget {BUILD_TARGET} -logFile C:\{SOME_PATH}\log.txt -projectPath C:\{PROJECT_PATH} -executeMethod {CLASS_AND_STATIC_METHOD_NAME_OF_BUILD_SCRIPT} -quit

macOS terminal

/Applications/Unity/Hub/Editor/{UNITY_VERSION}/Unity.app/Contents/MacOS/Unity -batchMode -skipMissingProjectID -skipMissingUPID -buildTarget {BUILD_TARGET} -logFile /Users/{SOME_PATH}/log.txt -projectPath /Users/{PROJECT_PATH} -executeMethod {CLASS_AND_STATIC_METHOD_NAME_OF_BUILD_SCRIPT} -quit
If you'd like to also run tests, you can add the following tags:
  • -runTests
  • -testPlatform {PLATFORM} // playmode or editmode
  • -testResults {FILE_PATH_AND_FILE_NAME}.xml

Template build script

Place your build script containing the static method that performs the build inside the editor folder. If you don't have an editor folder yet, create one.
Here is a template build script for your reference:
using UnityEditor;class MyEditorScript{ static void PerformBuild () { BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions(); buildPlayerOptions.scenes = new[] {"Assets/Scenes/MyScene.unity", ...}; buildPlayerOptions.target = BuildTarget.iOS; // More details on BuildTarget doc buildPlayerOptions.options = BuildOptions.None; buildPlayerOptions.locationPathName = "iOSBuild"; BuildPipeline.BuildPlayer(buildPlayerOptions); }}

Common issues

General:
  • Builds failing immediately
  • Unrecognized project error
  • Clone Hangs when Using Git Submodules
  • Lightmap Baking
Platform specific issues:
  • Android build failures
  • Errors after migrating to a new Xcode version
  • OSX Notarization failure
  • Problems with iOS Build Automation during XCode export
  • iOS build can not be downloaded or installed from Unity Build Automation

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.

  • On this page
    • Check the logs for errors

    • Run a clean build

    • Run locally in batch mode

      • Windows CMD console

      • macOS terminal

      • Template build script

    • Common issues


Report a problem with this page