Skip to Content

How to Configure CI/CD for Dev Builds

The most common mistake is assuming because the SDK is enabled in the Editor, it will also be included in the build. This is only partially true. If you create the build in the Editor, it should follow your Project Settings. However, if you are building with the command line, or using a CI/CD pipeline, you need to ensure that the SDK is included in the build by setting the USE_NUNU_SDK precompiler directive.

Depending on your build pipeline, there are several ways to set the scripting define symbol:

For mobile games, it’s important that deeplinks are properly configured!

Check out this page for more information on deeplinks: Mobile Deeplinks

Command Line

When using the command line build tool, add the following:

# Development build -defineSymbols "USE_NUNU_SDK;DEVELOPMENT_BUILD" # Production build -defineSymbols ""

Cloud Build Config

When building using a configuration file, for example with Unity Cloud Build:

{ "buildConfigs": { "development": { "defines": ["USE_NUNU_SDK", "DEVELOPMENT_BUILD"], "isDevelopmentBuild": true }, "production": { "defines": [], "isDevelopmentBuild": false } } }

GitLab CI

Add the defining symbol to the pipeline script:

image: unity-builder:2022.3.16f1 variables: UNITY_LICENSE_FILE: ${CI_PROJECT_DIR}/Unity_v2022.x.ulf BUILD_NAME: MyGame build_windows: stage: build script: - unity-editor -batchmode -nographics -quit -projectPath . -executeMethod BuildScript.Build -buildTarget Win64 -defineSymbols "USE_NUNU_SDK;DEVELOPMENT_BUILD"
Last updated on