# About add mutilple bank path?

**URL:** <https://qa.fmod.com/t/about-add-mutilple-bank-path/20652>\
**Category:** Unity\
**Created:** [September 14, 2023, 7:07am UTC](https://qa.fmod.com/t/about-add-mutilple-bank-path/20652 "2023-09-14T07:07:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MisakaCirno](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MisakaCirno](https://qa.fmod.com/u/MisakaCirno)\
**Post date:** [September 14, 2023, 7:07am UTC](https://qa.fmod.com/t/about-add-mutilple-bank-path/20652/1 "2023-09-14T07:07:04Z")

</div>

In the case of Android game development, the `.bank` file that accompanies the `.apk` file can no longer be in the same path as the `.bank` file for subsequent updates, so how do I solve this problem?

There seems to be no way to set multiple paths as search paths in `FMODStudioSettings`, does this mean that I should find these new `.bank` files myself and load them myself using the `LoadBank()` method?

---

<div class="post-metadata">

**Author:** ![MisakaCirno](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MisakaCirno](https://qa.fmod.com/u/MisakaCirno)\
**Post date:** [September 14, 2023, 12:26pm UTC](https://qa.fmod.com/t/about-add-mutilple-bank-path/20652/2 "2023-09-14T12:26:49Z")

</div>

My current approach is to extend my own method based on the `LoadBank` method in `RuntimeManager` to load the `.bank` file by providing a full path to the `.bank` file.

After testing it all seems to work fine, other than that is there any better way?

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [September 18, 2023, 5:06am UTC](https://qa.fmod.com/t/about-add-mutilple-bank-path/20652/3 "2023-09-18T05:06:47Z")

</div>

Hi,

I’m happy to see you’ve managed to find a solution. That said, since you recently asked about AssetBundles, are you using StreamingAssets or AssetBundles as your import type? With AssetBundles, while FMOD for Unity does build with the original banks, the user is responsible for loading new banks/bank versions at runtime, which need to be in the `TextAsset` format and loaded with the relevant overload for `RuntimeManager.LoadBank()`.

---

<div class="post-metadata">

**Author:** ![MisakaCirno](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MisakaCirno](https://qa.fmod.com/u/MisakaCirno)\
**Post date:** [September 18, 2023, 8:01am UTC](https://qa.fmod.com/t/about-add-mutilple-bank-path/20652/4 "2023-09-18T08:01:44Z")

</div>

Thank you for your reply.  
After our discussion, we finalized using StreamingAssets to store banks.

I set `Load Banks` in `FMODStudioSettings` to `None`, and then proceeded to load any specified bank file the same way I would with AssetBundles.

My modified method looks like this:

```auto
        public static void LoadBankByFilePath(string bankPath, string bankName, bool loadSamples = false)
        {
            string bankId = bankName;

            if (Instance.loadedBanks.ContainsKey(bankId))
            {
                ReferenceLoadedBank(bankId, loadSamples);
            }
            else
            {
                Instance.loadingBanksRef++;

#if UNITY_ANDROID && !UNITY_EDITOR
                if (Settings.Instance.AndroidUseOBB)
                {
                    Instance.StartCoroutine(Instance.loadFromWeb(bankPath, bankName, loadSamples));
                }
                else
#elif UNITY_WEBGL && !UNITY_EDITOR
                if (true)
                {
                    Instance.StartCoroutine(Instance.loadFromWeb(bankPath, bankName, loadSamples));
                }
                else
#endif // (UNITY_ANDROID || UNITY_WEBGL) && !UNITY_EDITOR
                {
                    LoadedBank loadedBank = new LoadedBank();
                    FMOD.RESULT loadResult = Instance.studioSystem.loadBankFile(bankPath, FMOD.Studio.LOAD_BANK_FLAGS.NORMAL, out loadedBank.Bank);
                    Instance.RegisterLoadedBank(loadedBank, bankPath, bankId, loadSamples, loadResult);

                    Instance.loadingBanksRef--;
                }
            }
        }

```

One interesting thing I realized during this process is that it doesn’t matter what the name of the `.bank` file is, even if you change it to any name, it will still work fine when loaded.

The same is true for `bankId`, but you need to make sure that the `bankId` is unique for each `.bank` file, and you need to make sure that you can map the `.bank` file to the `bankId`.Otherwise you won’t be able to unload them accurately.
