I’m using FMOD with Unity for a while now and recently updated to 2.01.11.
For some reason since the latest import FMOD won’t get the master banks anymore.
I’m running a multi platform build with the corresponding sub-folders and it went fine so far.
I’ve debugged the bank loading a bit.
For some reason it tries to load the Master.strings as “Desktop/Master.strings”
from bank path “Assets/FMOD_Build/Desktop”.
which then concatenates to a loadPath: “Assets/FMOD_Build/Desktop/Desktop/Master.strings.bank”.
I dont know where it goes wrong. Where does the duplicate “Desktop” come from?
Oddly enough the events preview fine in the Event Browser. Except for two banks for which it gives me:
KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <695d1cc93cca45069c528c15c9fdd749>:0)
FMODUnity.EditorUtils.PreviewEvent (FMODUnity.EditorEventRef eventRef, System.Collections.Generic.Dictionary`2[TKey,TValue] previewParamValues) (at Assets/Plugins/FMOD/src/Editor/EditorUtils.cs:697)
FMODUnity.EventBrowser+TransportControls.OnGUI (FMODUnity.EditorEventRef selectedEvent, System.Collections.Generic.Dictionary`2[TKey,TValue] parameterValues) (at Assets/Plugins/FMOD/src/Editor/EventBrowser.cs:1050)
FMODUnity.EventBrowser+PreviewArea.DrawEventPreview (FMODUnity.EditorEventRef eventRef, System.Single[] metering) (at Assets/Plugins/FMOD/src/Editor/EventBrowser.cs:853)
FMODUnity.EventBrowser+PreviewArea.OnGUI (System.Single[] metering) (at Assets/Plugins/FMOD/src/Editor/EventBrowser.cs:803)
FMODUnity.EventBrowser.OnGUI () (at Assets/Plugins/FMOD/src/Editor/EventBrowser.cs:679)
If I go back in version control I can keep the game at a working state. But I can’t update banks at the moment.
Thank you for sharing your solution, a few people have come across this issue and we haven’t been able to pin down the reason just yet. To help me reproduce this, can you please tell me what version of FMOD you had before updating, and what version of Unity you are using?
Hi, I just wanted to add… I’ve just gotten started using FMOD, and I think I was having this same issue. Except to fix it, in the “Bank Import” settings, I changed the build path up one from the “Desktop” folder.
This causes an error on the settings panel: “Build path “…/D:/MyGame/Banks” does contain any built banks.” However, when I run the game, all the sounds load fine.
If I change the build path back to “D:/MyGame/Banks/Desktop,” it fixes the error in the settings panel, but gives me the “RunTimeBankModel::openFile : Failed to open file ‘…/MyGame/AudioBanks/Desktop/Desktop/Master.strings.bank’” and “could not load bank” errors when I try to run it.
Interestingly, either way, I can view and listen to the audio events in the inspector.
Anyways, not exactly sure what I’ve done wrong, but it seems to be working, apart from the error in the settings panel.
I opened the project today and found the StudioSettings again as changed. Now it has duplicate entries. Apparently, it has duplicated the Console Platforms. They appeared once under Default and a second time under a parent called “Consoles”. If I select one “PS4”-entry it selects both.
Is this by design?
I can’t really select the entries directly under Default. If I delete one Entry the corresponding one is deleted as well.
Cheers
(I’m Rene - not using the account of my boss this time )
I have not seen that before, and that isn’t normal behaviour. I’m guessing It’s due to the new configurations you added to the target platforms and other workarounds you posted above?
If you delete them, does adding a new platform add one or two platforms / does adding any new platforms create one or two? And does this change if you reopen the project?
Thank you for the additional information- I have reproduced this issue by changing the Bank Import>Source Type to “Multiple Platform” and selecting the top level Bank directory as the path.
I have passed this onto the Dev team to fix up, for anyone who comes across this in the meantime, this is the workaround I came across:
In the FMOD Unity settings, change Initialization>Load Banks to “Specified”
I’m also having this issue, but only on one of our workstations. Both are using Unity 2021.2.11f1 and FMOD 2.02.04
As far as I can tell, our setups are completely identical, except it runs fine on one and gets the “…/Master.strings.bank could not load” error on the other. None of the workarounds listed in the posts above seem to do much of anything for it.
Did you manage to resolve this problem? I am experiencing the same behavior (FMOD version 2.02.04 | Unity version 2020.3.8f1) and the workaround posed by @jeff_fmod (which I assume was directed at your issue?) isn’t working for me.
I’m also on a fresh install.
Well, on my current configuration (setting the Build Path to the directory containing the Desktop directory, not the Desktop directory itself) the actual settings aren’t accessible. In spite of the inspector error, the banks can be loaded into a scene and read. I haven’t encountered any actual issues with this setup yet.
If I set the Build Path to the auto generated Desktop directory the inspector error disappears but now the banks can’t be loaded anymore - which makes sense, looking at the path printed in the error dump
And, not that I think it matters but who knows, here are the settings that reveal themselves when I set the Build Path to the auto generated Desktop directory. After following the steps of your proposed workaround and setting the Build Path to the “right” directory the settings become inaccessible again as the directory still isn’t recognized as containing any banks.
I’ve been on configuration #1 for a couple of days now and everything, aside from the ability to configure persistent settings I guess, works just fine. So yeah, I’m just here out of curiosity and to help you guys squash a potential bug
Thank you for the extra info. Does it work correctly if you change the Load Banks mode to “Specified” and add all your banks to the Specified Banks list?
Doesn’t work.
A strange detail is that setting Load Banks to Specified, playing the scene (instant crash, same errors as before), and then switching the Build Path from the Desktop directory back to the parent directory (the configuration that produces the error in the settings panel but allows for the banks to be correctly loaded in game) the banks don’t load correctly anymore and an instant runtime crash occurs. Makes sense, looking at the path printed in the error dump, but the path is different from the one being printed when setting the Build Path to the Desktop directory (see screenshot in my last post) so this might be relevant.
To get the banks to load again I had to set the Build Path back to the Desktop directory, change Load Banks to All, and then set the Build Path to the parent directory. The settings error remains.
Crashing is a new problem, would it be possible for you to upload a stripped-down reproduction to your FMOD Profile so we can investigate this in more detail? Just a Unity project with everything in the Assets directory removed except Assets/Plugins/FMOD and Assets/FMOD_Banks should be sufficient to reproduce the issue.
I’m seeing the same issue as mentioned above after pulling changes into a branch.
When I switch the Initialization > Load Banks to Specific and Add All, it works and I hear the audio without errors. When I subsequently change Load Banks back to All, it gives the duplicate “Desktop/Desktop” error and no audio plays.
[EDIT]
In our source control, I reverted FMODStudioSettings.asset and FMODStudioCache.asset and the issue went away. This makes me think there’s an edge case on importing that caused the settings to get in a broken state. Will post here again if it happens again and I won’t revert the asset files without saving them off first
Thank you for the update, hopefully it doesn’t come up again- can you please tell me what version of the FMOD Unity integration you are using?
If you recently updated from an older version, what version were you using previously?