I have a number of audio tracks that I’m storing in my project’s resources folder, and I’d like to be able to play them dynamically using FMOD without having to copy them all to fmod and create events for each individual sound.
It seems like audio tables are the suggested approach, but when I read the documentation for them, they mention that the files themselves should be stored outside the fmod project.
This makes me wonder: how is this possible? Since there’s no static, guaranteed path for the files to end up (i.e. it varies by system), where exactly would I place these files? For example, if I were to put them in my Unity’s resources folder, I believe they may not end up as individual files at all. So where should I be putting these files, and how will fmod find them at runtime?
Also, I’m finding it painfully hard to find simple example code for how to do this, so if anyone has anything nice and concise, that would be much appreciated. But for now, I’m trying to figure out what the proper setup in the first place would be.
Are you familiar with the concept of FMOD Studio bank files? When you’re done creating all the content you game needs in your FMOD Studio project, you “build” it. Building the project creates a series of .bank files in the project folder’s “banks” subfolder - and it’s these bank files that are used by your unity project, not the FMOD Studio project that was used to create them.
I mention this because every audio table is associated with a specific bank - and when you build the project, all the audio files associated with that bank get included in the built bank file. This means that while you should store the audio files for your audio tables external to your FMOD Studio project, you do not need to include those files separately in your game’s installer, because they’ll already be included in your game’s .bank files.
Gotcha, that makes sense, thanks! I was familiar with that idea, but something about the wording in the documentation made it sound to me like since they would be external to the project they would also not be embedded in the bank.