-quit -batchmode -executeMethod YourEditorScript.YourBuildMethod [-nographics]
or
-quit -batchmode -buildWindowsPlayer path/to/your/build.exe
or
-quit -batchmode -buildOSXPlayer path/to/your/build.app
If this value isn't set, the globalArgLine is used.
Note: we make little to no attempt to detect conflicting arguments or arguments not suitable to the platform neither at configuration nor at runtime.
If the specified command line contains no -projectpath
argument, the plugin automatically adds one with the proper parameter (the workspace of the project on the target machine).
This is to make sure unity builds the proper project. Otherwise unity would reuse the last opened project. You can override it, but this hasn't been thoroughly tested.
If your build agent have multiple executors (which you should probably do), it is highly recommended to make use of a -logFile
argument to avoid letting Unityed write to the standard editor.log concurrently. A recommended practise is to use something like -logFile "$WORKSPACE/unity3d_editor.log"
.
See the official Editor command line arguments documentation.