We have an issue in our automated builds where the sound doesn’t work, and we’ve tracked it down to StreamingAssets being missing. After digging through the FMOD integration and extensive logging I think I’ve nailed it down to EventManager.UpdateCache aborting the update when it can’t initialize an output device, and due to the cache not being updated EventManager.CopyToStreamingAssets doesn’t know about any banks.
We are using a virtual machine to build so it’s not weird that it doesn’t have any audio devices.
We have FMOD Unity Integration 2.01.05 which gives the stacktrace below, and I went over the release notes for later versions and found no mention of this issue.
FMOD Studio: Encounterd Error: ERR_OUTPUT_INIT Error initializing output device. UnityEngine.StackTraceUtility:ExtractStackTrace () UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object) UnityEngine.Logger:Log (UnityEngine.LogType,object) UnityEngine.Debug:LogError (object) FMODUnity.EditorUtils:CheckResult (FMOD.RESULT) (at Assets/Plugins/FMOD/src/Editor/EditorUtils.cs:25) FMODUnity.EditorUtils:CreateSystem () (at Assets/Plugins/FMOD/src/Editor/EditorUtils.cs:237) FMODUnity.EditorUtils:get_System () (at Assets/Plugins/FMOD/src/Editor/EditorUtils.cs:296) FMODUnity.EventManager:UpdateCache () (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:158) FMODUnity.EventManager:RefreshBanks () (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:38) FMODUnity.EventManager:BuildTargetChanged () (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:664) FMODUnity.EventManager/PreprocessBuild:OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport) (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:853)