Bus not found when using Unity batch mode or Cloud Build

Everything works as expected in the editor and it all works fine in a build from the editor as well. However, I get the following error when trying to call RuntimeManager.GetBus(busPath); when running a build generated in batch mode from the command line (which is also what Cloud Build uses).

BusNotFoundException: [FMOD] Bus not found 'bus:/SFX/Weather/Wind Howls'
  at FMODUnity.RuntimeManager.GetBus (System.String path) [0x00000] in <00000000000000000000000000000000>:0 
  at GoldFire.FMODPlayer.SetVolume (System.String name, System.Single value) [0x00000] in <00000000000000000000000000000000>:0 
  at WeatherController.SetWeather () [0x00000] in <00000000000000000000000000000000>:0 
  at WeatherController.Start () [0x00000] in <00000000000000000000000000000000>:0 

I’m using Unity 2021.2.18 with FMOD Unity Integration 2.02.03. I’ve confirmed that the Master.bank is in the build as are the StreamingAssets. The FMOD settings in Unity correctly point to the FMOD project, but I also tried doing “single platform” and pointing to the build location with the same result. The same issue happens with a Mac or Windows build.

I’ve not been able to replicate this issue. I’ve created a Unity project, can grab any bus, and can play without issues when built from the command line in batch mode.

Are you able to share your build script with us?

Sure, this is the script:

using System;
using UnityEditor;

class AutoBuild {
  /// <summary>
  /// Run the automated build.
  /// </summary>
  static void Run() {
    // Get the list of scenes in the build.
    EditorBuildSettingsScene[] enabledScenes = Array.FindAll(EditorBuildSettings.scenes , (s) => s.enabled);
    string[] scenes = new string[enabledScenes.Length];
    for (int i = 0; i < enabledScenes.Length; i += 1) {
      scenes[i] = enabledScenes[i].path;

    // Run the build.
    BuildPipeline.BuildPlayer(scenes, "Build", BuildTarget.StandaloneOSX, BuildOptions.None);      

I’m still able to build a game using this script that correctly finds the bus path.

Do you have any scripts that might if...else check if the game is playing in Editor mode? Are you able to create a small blank Unity game with the same FMOD Studio banks and see if the same issue persists?

If possible, please also share a screenshot of all the FMOD settings in Unity expanded so we can check if anything is happening there.