Coherence settings unset when using scripted build pipeline

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().
1 Like

Video showing the issue

1 Like

Thanks for all the info @Punchey and @elli!

Looking at the video: it looks like we require CoherenceSyncConfigRegistry and RuntimeSettings to be in the preloaded assets array. I can see in the video that Elli posted that there’s a warning regarding just this. She quickly clicks to add it again, before launching the build. But @Punchey you mentioned that your build system clears it. So I believe that’s the issue?

Is it necessary to clear this array? Can you perhaps only clear additional assets, and keep coherence’s in the first two slots? Or maybe clear it all, and readd them manually?

Ah yes, that may be it. We have to clear them due to other libraries placing spurious content in there that we need to remove prior to build. But perhaps we can override with our own list instead of just clearing. So we’ll have to add Coherence’s assets to our own custom list. I’ll give that a shot and see if that resolves the issues. Thanks!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.