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

**URL:** https://qa.fmod.com/t/events-are-not-being-found-when-creating-builds-but-work-fine-in-unity-editor/19382
**Category:** FMOD Studio
**Created:** [October 10, 2022, 6:14pm UTC](https://qa.fmod.com/t/events-are-not-being-found-when-creating-builds-but-work-fine-in-unity-editor/19382 "2022-10-10T18:14:00Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Inkfish](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@Inkfish](https://qa.fmod.com/u/Inkfish)
#### Post date: [October 10, 2022, 6:14pm UTC](https://qa.fmod.com/t/events-are-not-being-found-when-creating-builds-but-work-fine-in-unity-editor/19382/1 "2022-10-10T18:14:00Z")

</div>

Hi i am bumping [my original issue](https://qa.fmod.com/t/trying-to-play-event-but-event-description-is-not-valid/19275) 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. 🙏

---

<div class="post-metadata">

### Author: ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)
#### Post date: [October 11, 2022, 4:14am UTC](https://qa.fmod.com/t/events-are-not-being-found-when-creating-builds-but-work-fine-in-unity-editor/19382/2 "2022-10-11T04:14:36Z")

</div>

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

```auto
BankLoadException: [FMOD] Could not load bank

```

exception after updating the bank directory?  
The second error of

```auto
[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.

---

<div class="post-metadata">

### Author: ![Inkfish](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@Inkfish](https://qa.fmod.com/u/Inkfish)
#### Post date: [October 12, 2022, 4:19pm UTC](https://qa.fmod.com/t/events-are-not-being-found-when-creating-builds-but-work-fine-in-unity-editor/19382/3 "2022-10-12T16:19:48Z")

</div>

Hi Jeff, thanks for getting back to me…

Can i ask where you found the

```auto
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?

 ![EONWAR_l2dLvszedZ](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/b/b4f399b0cb29f691859692504dec4ea0e8b59b1f.jpeg)

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:

 ![FMOD_Studio_ZNmoDF4d4r](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/f/f052ca3354f104b1cfe8cf414b81b403fb8a3c85.png)

The built banks remain as they always have:

 ![FMOD_Studio_Yc59bVM4bb](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/8/865c8fc8204a038358a91b5ea6c22bb1e84859d4.png)

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

 ![explorer_7uu8YODC2R](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/7/727e9a37b00aa6ac3d998e51a75700af7978b3ef.png)

Thanks

---

<div class="post-metadata">

### Author: ![Inkfish](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@Inkfish](https://qa.fmod.com/u/Inkfish)
#### Post date: [October 12, 2022, 11:36pm UTC](https://qa.fmod.com/t/events-are-not-being-found-when-creating-builds-but-work-fine-in-unity-editor/19382/4 "2022-10-12T23:36:44Z")

</div>

> [@jeff\_fmod](#):
>
> `In SoundClip.Initialize are you looking up events using the RuntimeManager or an Editor-only event lookup method such as FMODUnity.EventReference.Find?.`

 ![notepad++_LKCqlw8ncJ](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/4/4b291832bba0a6b63c8649f11ca63c9af28925a4.png)

---

<div class="post-metadata">

### Author: ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)
#### Post date: [October 13, 2022, 12:08am UTC](https://qa.fmod.com/t/events-are-not-being-found-when-creating-builds-but-work-fine-in-unity-editor/19382/5 "2022-10-13T00:08:40Z")

</div>

> [@Inkfish](#):
>
> Can i ask where you found the
> 
> ```auto
> BankLoadException: [FMOD] Could not load bank
> 
> ```

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

```auto
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?

---

<div class="post-metadata">

### Author: ![Inkfish](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@Inkfish](https://qa.fmod.com/u/Inkfish)
#### Post date: [October 13, 2022, 10:44am UTC](https://qa.fmod.com/t/events-are-not-being-found-when-creating-builds-but-work-fine-in-unity-editor/19382/6 "2022-10-13T10:44:30Z")

</div>

Hi Jeff

Please view the images:

 ![Unity_q9kZZmnF6x](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/e/ebe2275223ed7305d49c3b05fcb854becad5d053.jpeg)  
I also clicked browse in the image above to show the directory is indeed the correct path

 ![Unity_7p6DxYf0HG](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/2/20d2b6da4d6e9ccc3ef161b2abdb5d14af8ac3d9.png)

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?

---

<div class="post-metadata">

### Author: ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)
#### Post date: [October 13, 2022, 10:56pm UTC](https://qa.fmod.com/t/events-are-not-being-found-when-creating-builds-but-work-fine-in-unity-editor/19382/7 "2022-10-13T22:56:08Z")

</div>

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](https://fmod.com/docs/2.02/unity/user-guide.html#building-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.

---

<div class="post-metadata">

### Author: ![Inkfish](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@Inkfish](https://qa.fmod.com/u/Inkfish)
#### Post date: [October 14, 2022, 12:21am UTC](https://qa.fmod.com/t/events-are-not-being-found-when-creating-builds-but-work-fine-in-unity-editor/19382/8 "2022-10-14T00:21:12Z")

</div>

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 🙏 😁

[Player.log](https://qa.fmod.com/uploads/short-url/nlhMnRINXL4Cnx23uExJITdWImQ.log) (21.1 KB)

---

<div class="post-metadata">

### Author: ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)
#### Post date: [October 16, 2022, 11:39pm UTC](https://qa.fmod.com/t/events-are-not-being-found-when-creating-builds-but-work-fine-in-unity-editor/19382/9 "2022-10-16T23:39:52Z")

</div>

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.
