# EventNotFoundException batchmode build TeamCity

**URL:** https://qa.fmod.com/t/eventnotfoundexception-batchmode-build-teamcity/16769
**Category:** Unity
**Tags:** csharp, unity, android
**Created:** [February 17, 2021, 8:40am UTC](https://qa.fmod.com/t/eventnotfoundexception-batchmode-build-teamcity/16769 "2021-02-17T08:40:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![huran438](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/huran438/32/1936_2.png) [@huran438](https://qa.fmod.com/u/huran438)
#### Post date: [February 17, 2021, 8:40am UTC](https://qa.fmod.com/t/eventnotfoundexception-batchmode-build-teamcity/16769/1 "2021-02-17T08:40:50Z")

</div>

Hi. We’re using FMOD Unity Plugin and Studio 20.01.07. We are using Unity 2019.4.20 and TeamCity for CI. If we’re building application from the Editor everything is OK. But when it built with batchmode from TeamCity StreamingAssets and banks are missing.

Solutions we tried:

> [@Issue with StreamingAssets copy when running Unity in batchmode](https://qa.fmod.com/t/issue-with-streamingassets-copy-when-running-unity-in-batchmode/13284):
>
> Hi, I recently added the FMOD Studio Unity integration to our project and it has all been working great apart from one thing, our automated builds are missing all of the soundbanks. Our project is set up to use the “Streaming Assets” import type, and is linked to the fmod project via the project file path. This all works correctly when running in the editor, switching platforms and making builds from the editor, in all of these cases the banks are copied over to StreamingAssets as expected. O…

> [@Sound not playing in build (unity cloud)](https://qa.fmod.com/t/sound-not-playing-in-build-unity-cloud/14345):
>
> Hello , I am using Fmod with Unity 5. The integration has been working really well, we have been testing and using it for several months. We are now trying to use Unity cloud, where before we would run the game mostly locally in the editor and building in each of our computers. In unity cloud however, we get some errors, from missing banks. We have tried several options already in Unity clould build, and also did a development build to try and figure out what the error might be…we do h…

---

<div class="post-metadata">

### Author: ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)
#### Post date: [February 18, 2021, 3:57am UTC](https://qa.fmod.com/t/eventnotfoundexception-batchmode-build-teamcity/16769/2 "2021-02-18T03:57:35Z")

</div>

It sounds like TeamCity must be failing to trigger the build, failing to copy the built banks into the correct location, or otherwise not correctly handling building your FMOD Studio project.

How does TeamCity trigger the building of FMOD Studio banks, and how does it differ from your process when you build the banks manually?

---

<div class="post-metadata">

### Author: ![huran438](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/huran438/32/1936_2.png) [@huran438](https://qa.fmod.com/u/huran438)
#### Post date: [February 18, 2021, 9:37am UTC](https://qa.fmod.com/t/eventnotfoundexception-batchmode-build-teamcity/16769/3 "2021-02-18T09:37:11Z")

</div>

TeamCity is just calling Unity to build project in batchmode by calling static method.

```
BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions
        {
            scenes = GetEnabledScenes(),
            locationPathName = GetFilePath(BuildType.Master),
            target = EditorUserBuildSettings.activeBuildTarget,
            options = BuildOptions.CompressWithLz4HC
        };

        //Start Build

        BuildFMODFiles();
        
        BuildPipeline.BuildPlayer(buildPlayerOptions);

[MenuItem("Tools/CI/Build FMOD files", false, 1000)]
    public static void BuildFMODFiles()
    {
        EventManager.RefreshBanks();
        EventManager.CopyToStreamingAssets();
    }
```

---

<div class="post-metadata">

### Author: ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)
#### Post date: [February 19, 2021, 12:25am UTC](https://qa.fmod.com/t/eventnotfoundexception-batchmode-build-teamcity/16769/4 "2021-02-19T00:25:18Z")

</div>

`RefreshBanks()` copies the bank files in your FMOD Studio project’s build directory into your Unity project, but does not actually build new versions of those banks in FMOD Studio. As a result, your `BuildFMODFiles()` function does not actually build any FMOD files.

Could this explain the issue you’re seeing?
