VCA Errors when Building Unity Game From Command Line/Terminal

Hey all,

We’re having an issue with specific VCA’s failing to load in our Unity game, but only when the game is built from the command line. If the game is built in-editor (using the build game option), it’s fine and all audio runs perfectly.

This error only occurs when we run the game from a version built from command line. After we which we have the following error on start, as well as some (but not all) audio events failing.

Any advice on how to address this would be great!
Thanks
Tommy

Project Details

  • Unity 2021.3.18f1
  • FMOD Studio 2.02.07
  • FMOD / Unity integration 2.02.11
VCANotFoundException: [FMOD] VCA not found 'vca:/Master'
  at FMODUnity.RuntimeManager.GetVCA (System.String path) [0x00024] in C:\TeamCity\buildAgent\work\849f7d1f443c3e3a\PROJECT\Assets\Plugins\FMOD\src\RuntimeManager.cs:1311 
  at AUDIO.AudioSettings.Initialise () [0x00001] in C:\TeamCity\buildAgent\work\849f7d1f443c3e3a\PROJECT\Assets\PROJECT\Scripts\Audio\AudioSettings.cs:29 
  at AUDIO.AudioSettings..cctor () [0x00001] in C:\TeamCity\buildAgent\work\849f7d1f443c3e3a\PROJECT\Assets\PROJECT\Scripts\Audio\AudioSettings.cs:23 
Rethrow as TypeInitializationException: The type initializer for 'AUDIO.AudioSettings' threw an exception.
  at AUDIO.VolumeSlider.Start () [0x00001] in C:\TeamCity\buildAgent\work\849f7d1f443c3e3a\PROJECT\Assets\PROJECT\Scripts\Audio\VolumeSlider.cs:25

Hi,

Thanks for the info - to help diagnose the issue, can I get you to share logs for the command line built with FMOD Unity’s logging level set to “Log”? Also, how are you handling asset importing - Streaming Assets or Asset Bundles/Addressables?

Hey, sorry for the delay in responding.
Please find below links to the editor logs from our command line and in-editor builds respectively (can’t attach them to the post). We’re using Streaming Assets for the audio banks at this time.

Thanks

Command line build:

Editor build:

Thanks for the logs. The issues you’re running into are typically caused by being unable to load banks, and it seems likely that the command line build isn’t copying some or all of your banks to the build directory properly. You should be able to verify this yourself by looking for the banks at ./your Build/yourBuild_Data/StreaingAssets.

If the banks are present in the command line build, how are you going about loading your banks?

If they aren’t present, there is a known issue with command line builds when using Addressables/Asset Bundles where banks aren’t copied to the build directory that has been fixed as of 2.02.15, which may be related. If possible, I would recommend testing a command line build with the latest FMOD Unity version and seeing whether that resolves the issue.

If the banks are present, or upgrading FMOD Unity doesn’t resolve the issue, could I get the exact command you’re using to generate your command line build, as well as any the code of any scripts you’re executing from the command line build with -executeMethod?

Thanks for taking a look. We messed with different configurations, and our solution has been to set the bank build directory in FMOD to be the Streaming Assets folder in Unity. Then we point the FMOD config in Unity to those banks as a Single-Platform Build. This appears to mitigate the issues of the banks not being imported/copied over successfully.

Not a perfect solution. But for the purposes of our CI, it suits our needs.
Thanks again.

1 Like