Build Options #
If you’re upgrading from
v1.5.10 or earlier, please note that configuration data will no longer be embedded in our SDK package directory, and instead relocated to your project’s Assets folder under
Assets/Embrace. Any previously defined configurations will be automatically converted at installation time to the updated format described in this document.
SDK Configuration Options #
The behavior of the Embrace Unity SDK can be customized through the same list of configuration options as the Android and iOS SDKs.
Configuration options can be accessed in the Configurations tab of the Settings window. This window can be opened through the top-level menu Tools > Embrace > Settings or by clicking on the Customize SDK Configuration button from the Getting Started window.
Configuring Environments #
Some applications have complex build pipelines. For example, it’s common practice for a development team to work in a “Dev” environment, then push their changes to a “Staging” when features are complete and ready to be tested, and finally released to a “Production” upon final approval. In such cases it may be beneficial define different configuration options for each environment. The Embrace SDK supports this this type of workflow through the Environments list available in the Settings window.
Using this list you can easily add, rename, or remove environments as needed. Each environment will create an Android and iOS configuration file stored in the Embrace data directory.
You can select and configure each environment by clicking on the "=" icon to the left of each list item in the Settings window, or by selecting an environment from the Getting Started window.
NOTE: Most of the time users will not see the creation of configuration data when the Environments list is edited. However, if you happen to peek in the Configurations folder, you’ll notice that upon defining an environment configuration objects are created with a GUID-based name. They will get automatically renamed to match user input once the Update Environments is pressed, or if the Settings window loses focus. See the reference images above for an example.
Specifying Environments At Build Time #
The Embrace SDK also supports specifying a configuration environment at build-time through the use of environment variables defined at the OS level. This feature can enable a CI/CD pipeline to define which environment to build with. We support the follwing definitions:
- Define this variable with the index number of an existing Embrace configuration environment.
Out-of-range indices will result in build failure.
- Define this variable with the name of an existing configuration environment (e.g. “Dev”, “Staging”, or “Prod”);
We only support the use of a single environment variable to specify an Embrace configuration. Please be aware that defining both variables at build-time will result in a failed build.
For example, let’s assume the following environment configurations are defined (“Dev”, “Staging”, and “Prod”), and the CI/CD build-time target environment should be “Staging”.