Skip to main content

Command-line/Batch Mode Support

Build Assistant supports command-line execution for CI/CD integration with systems like Jenkins, TeamCity, or GitHub Actions.

Basic Unity Arguments​

To run builds from the command line, Unity requires these standard arguments:

  • -batchmode - Runs Unity without a GUI
  • -quit - Unity exits automatically after the build completes
  • -projectPath <path> - Path to your Unity project folder

Build Assistant Arguments​

Required Arguments​

  • -executeMethod "BuildAssistant.BuildAssistantService.BatchmodeBuildTask"
    Executes Build Assistant's batch mode build service

  • -buildConfig <name>
    Name of the build configuration ScriptableObject to run

Optional Arguments​

  • -buildNumberOverride <number>
    Override the build number. Typically passed from CI systems like Jenkins or TeamCity
  • -workspaceOverride <path>
    Override the root path or workspace directory for the build. Usually passed from CI systems to set the build output location.

Example Command​

Unity.exe -batchmode -quit -projectPath "C:\Path\To\Project" -executeMethod "BuildAssistant.BuildAssistantService.BatchmodeBuildTask" -buildConfig "Windows_Production" -buildNumberOverride "123" -workspaceOverride "C:\Builds\Workspace"
Avoid Spaces in Project Paths

Issues can occur if there are spaces in the path to your Unity project. Avoid using spaces in project paths to prevent command-line argument parsing errors.

CI/CD Integration​

A PowerShell example for batch-mode builds ships in the core package sample CI Example (BatchBuildExample.ps1).