This article addresses the issue of toggling Development Builds through the Unity Build Automation API. Although this option is only available via the web dashboard and not through the API, you can modify the advanced settings within the request body using the updateBuildTarget PUT request to update the configuration of a build target.
Symptoms
- Inability to toggle Development Builds using the Unity Build Automation API.
- The option is only available through the web dashboard.
Causes
The Development Build option for a build target is not explicitly available through the Unity Build Automation API, so users must use the web dashboard or alternative scripting methods.
Resolution
One workaround to configure the Development Build option via the Build Automation API is to modify the advanced settings within the request body using the updateBuildTarget PUT request.
The relevant endpoint you have to use is:
/orgs/{ORG_ID}/projects/{PROJECT_ID}/buildtargets/{BUILDTARGET_NAME}Then, set the advanced.unity.playerExporter.buildOptions property to an empty array[] to turn off the Development Build option.
An example JSON body is provided below:
{
"settings": {
"advanced": {
"unity": {
"playerExporter": {
"buildOptions": []
}
}
}
}
}More Information
For more information, please refer to the Build Automation API documentation.