Unity BuildPipeline.BuildPlayer & DllNotFoundException: fmodstudio

We have an automated build process that uses Unity’s BuildPipeline.BuildPlayer and in this case it is told to make a StandaloneWindows64 target with BuildOptions.StrictMode.

Later on in FMODUnity.Settings.BuildProcessor.OnPostProcessBuild the DLL that gets chosen is determined based on whether EditorUserBuildSettings.activeScriptCompilationDefines.Contains("DEVELOPMENT_BUILD").

These two things don’t seem to match up, or at least Unity does not seem to update EditorUserbuildSettings when using BuildPipeline.BuildPlayer.

Instead, I think FMOD should be using report.summary.options.HasFlag(BuildOptions.Development) as the condition, or something that’s set as part of the build process rather than a user editor setting, but any other workarounds would be appreciated.

Thanks for the report, previously we had FMOD configured the way you describe, using the BuildOptions.Development however there is some incompatibility with some use cases. We will investigate and try to resolve all related issues.

This issue will be fixed in the next release (2.01.10). In the meantime, you can fix it locally by changing Settings.BuildProcessor.OnPreprocessBuild() to check report.summary.options.HasFlag(BuildOptions.Development), as you suggested.