Events are not being found when creating builds but work fine in Unity editor

Hi i am bumping my original issue in this forum as i’m not getting much traction in the Unity forum, in the hope someone can shed some light on whats going on.

This issue is now impacting our ability to continue with the project.

Any help, suggestions and ideas we can try are all very much appreciated. :pray:

Looking at your log, the issue with bank loading seems to be due to an invalid path. As you mentioned this is likely due to chaning the bank directory. Are you still getting the

BankLoadException: [FMOD] Could not load bank

exception after updating the bank directory?
The second error of

[Not game breaking] FMOD event '{2f41d9e6-31ac-4b71-9399-af0cc23ab6fb}' is invalid. Error: ERR_EVENT_NOTFOUND.

is probably due to the missing banks, but if you’ve sorted the bank path out and are still getting this erorr, then I suspect it is to do with the way you are looking up events. In SoundClip.Initialize are you looking up events using the RuntimeManager or an Editor-only event lookup method such as FMODUnity.EventReference.Find? If you are using an Editor-only event lookup method that might explain why events are missing at build time.

Hi Jeff, thanks for getting back to me…

Can i ask where you found the

BankLoadException: [FMOD] Could not load bank

error? If you view my image below i couldn’t find any error in the log with that handle?

Also I wanted to confirm that I never changed the Banks location, only the Assets location to a reachable path on my laptop. But its now been reverted to the original path as u can see in the image below:

The built banks remain as they always have:

The first screenshot above was taken from a newly compiled build and after i had opened FMOD and rebuilt all the banks. Youc an see that the filepaths are correct and this is further confirmed by my ability to play all the events within Unity via the FMOD event browser.

To give some history about our project, we have never had any audio event initialisation issues until this most recent spurt of errors. We have been making builds for over 2 years without any issues in audio!

I have also asked my devs to look at your question regarding SoundClip.initialize and i will report back what they say too.

My banks seem to be exporting correctly and in the right location

Thanks

It was in the first log you provided in the linked case. Line 114 is

BankLoadException: [FMOD] Could not load bank 'D:/EON/BUILD/EONWAR_Data/StreamingAssets/FMODBanks/Cyborne.bank' : ERR_FILE_NOTFOUND : File not found.
  at FMODUnity.RuntimeManager.loadedBankRegister (FMODUnity.RuntimeManager+LoadedBank loadedBank, System.String bankPath, System.String bankName, System.Boolean loadSamples, FMOD.RESULT loadResult) [0x0005a] in C:\Users\MK\EONWAR Project\eonwar-2020\Assets\Plugins\FMOD\src\RuntimeManager.cs:851 
  at FMODUnity.RuntimeManager.LoadBank (System.String bankName, System.Boolean loadSamples) [0x000ef] in C:\Users\MK\EONWAR Project\eonwar-2020\Assets\Plugins\FMOD\src\RuntimeManager.cs:957 
  at Eon.Audio.AudioSystem.LoadPersistentBanks () [0x00014] in C:\Users\MK\EONWAR Project\eonwar-2020\Assets\_EonWar\Scripts\Shared\Audio\AudioSystem.cs:42 
  at Eon.Audio.AudioSystem.OnAwake () [0x0000c] in C:\Users\MK\EONWAR Project\eonwar-2020\Assets\_EonWar\Scripts\Shared\Audio\AudioSystem.cs:27 
  at MiddleMast.Singleton`1[T].Awake () [0x00032] in C:\Users\MK\EONWAR Project\eonwar-2020\Assets\MiddleMast\Scripts\Handlers\Singletons\Singleton.cs:55 

Just wanted to see if you were still hitting that, I see you are not- thank you for confirming.

It is strange that the event with that guid exists in the Unity Editor but not in a build. Can you please share a screenshot of your FMOD Unity Settings, including the Platform settings for Default, Editor, and Desktop?

Hi Jeff

Please view the images:


I also clicked browse in the image above to show the directory is indeed the correct path

That said i noticed the “Event Linkage” option is set to path and not GUID, is that perhaps the issue?
I don’t see the “Desktop” settings?

Thank you for the additional information. There should be no issue with setting event linkage to “Path” as this is only for use in the Unity Editor and the guid lookup mode will always be used at runtime in a built game.
I see you have your import type set to “Asset Bundle”, are you using AssetBundles or Addressables? If you are using AssetBundes that might explain the issue with missing guids, and rebuilding your AssetBundles might fix the problem.
No need for concern regarding the missing Desktop platform, the integration will use your Default, which will be your Desktop banks anyway.

Hi Jeff, changing the option from Asset Bundle to Streaming Assets HAS brought audio back into the build!! Thank you very much. I presume asset bundle is the default option? otherwise i have no idea why it changed.

There is a new 404 error that has surfaced since making the change however, though i suspect its nothing to do with FMOD. Pasting the log just in case it helps?

Thanks again! You’re a lifesaver :pray: :grin:

Player.log (21.1 KB)

Glad to hear that’s working now! The default is supposed to be “Streaming Assets” to avoid confusing situations like this. I am not sure how it got changed to “Asset Bundles”; please let me know if that mysteriously changes again and I will investigate further.
I cannot see anything related to FMOD in that log- except for needing to add an FMOD Studio Listener to your camera, but that would be unrelated to the 404 coming from “ServerRegionFinder.cs” which doesn’t seem to have anything to do with FMOD.