# FMOD.Studio.Bank

**URL:** <https://qa.fmod.com/t/fmod-studio-bank/16530>\
**Category:** Unity\
**Created:** [December 7, 2020, 9:19pm UTC](https://qa.fmod.com/t/fmod-studio-bank/16530 "2020-12-07T21:19:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrian66](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@Adrian66](https://qa.fmod.com/u/Adrian66)\
**Post date:** [December 7, 2020, 9:19pm UTC](https://qa.fmod.com/t/fmod-studio-bank/16530/1 "2020-12-07T21:19:40Z")

</div>

Hello!

I use Unity. Sorry if my question is very obviously question. But i don´t know get use FMOD.Studio.Bank.  
I can load a bank use RuntimeManager.LoadBank() but i don´t know to access by FMOD.Studio.Bank  
Anybody can help me and show me how is in code, using of FMOD.Studio.Bank.loadSampleData() ?? An example Script.

I don’t know if is the same of RuntimeManager.LoadBank()

Another question is that i donut feel the different between use Preload Data, and don’t use. There are any way of get the time of latency between you pres any key and the sound start. In streaming sound too.

Thanks for all,

Adrian.

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [December 11, 2020, 4:10am UTC](https://qa.fmod.com/t/fmod-studio-bank/16530/2 "2020-12-11T04:10:23Z")

</div>

The `FMOD.Studio.Bank variable_name` declares the variable `variable_name` to be an FMOD Bank. When using this with the RuntimeManager helper function, it’s not possible to mix this helper file with the FMOD bank variable. So you can either use:

```cs
FMODUnity.RuntimeManager.LoadBank("bank://Master.bank", true); // The "true" is for loading sample data

```

Or:

```cs
FMOD.Studio.System sys = FMODUnity.RuntimeManager.StudioSystem;
FMOD.Studio.Bank fmod_bank;
sys.loadBankFile("bank://Master.bank", FMOD.Studio.LOAD_BANK_FLAGS.NORMAL, out fmod_bank);
fmod_bank.loadSampleData();

```

---

<div class="post-metadata">

**Author:** ![Adrian66](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@Adrian66](https://qa.fmod.com/u/Adrian66)\
**Post date:** [December 12, 2020, 12:48pm UTC](https://qa.fmod.com/t/fmod-studio-bank/16530/3 "2020-12-12T12:48:12Z")

</div>

Thanks!!! Thank very much for help me. What is the different between use RuntimeManager, and use the other way?

Sorry, but Unity tell me an error about :

sys.loadBankFile(“bank://Prueba.bank”, FMOD.Studio.LOAD\_BANK\_FLAGS.NORMAL, out bank);

error:

[FMOD] FMOD\_OS\_File\_Open : fopen failed to open ‘bank://Prueba.bank’, errno = 2

UnityEngine.Debug:LogError(Object)  
FMODUnity.RuntimeManager:DEBUG\_CALLBACK(DEBUG\_FLAGS, StringWrapper, Int32, StringWrapper, StringWrapper) (at Assets/Plugins/FMOD/src/Runtime/RuntimeManager.cs:28)

Thanks again.

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [December 17, 2020, 12:15am UTC](https://qa.fmod.com/t/fmod-studio-bank/16530/4 "2020-12-17T00:15:18Z")

</div>

The difference is just that `RuntimeManager` are helper functions. They actually perform the same actions as the longer version.

In regards to your error, it’s most likely due to the way Unity stores its files. Try using the following:

```auto
[FMODUnity.BankRef]
public string bankPath; // Put this and the line above at the top of the file, after "public class" and before "void Start"

FMODUnity.RuntimeManager.LoadBank(bankPath, true); // The "bankPath" variable will take the path provided by the GUI bank selector

```

This will make a bank browser appear in the component where the script is on the game object. You can select the bank needed from here and this will be automatically get the correct path from within Unity.
