We are having a problem when we use our custom scripted build pipeline. The issue seems to be that when we execute a build (which applies certain Player settings, such as scenes list, compiler defines, target platform, etc), we lose various Coherence settings. My colleague has a video showing specifics she will post below. We were wondering what might be causing this, because we have special needs that prevent us from using the standard built-in Unity build workflow.
On the Discord channel, we were asked for details on what our scripted build process does. Here is a summary of the main things:
- Set scripting define symbols for the build target group
- Set platform-specific player settings (Android minSDK version, target architecture, etc)
- Set misc PlayerSettings (vSyncCount, managed stripping level, scripting backend, etc)
- Clear preloaded assets array
- Force-enable specific XR loaders
- Add/remove any platform specific packages via package manager API
- Set build path and target platform
- Set misc build options (development build, allow debugging, strict mode, etc)
- The begin build with BuildPipeline.BuildPlayer().