Working with Localized Audio Tables

Hey there!

I feel a little embarrassed asking this, but I’m struggling to get Localized Audio Tables working with the provided example on how to use Programmer Instruments. And I’m not sure if there’s something I’m not understanding in the code, or if I’m setting up something incorrectly in our FMOD Studio project.

FMOD Studio project setup

Okay, so in my project, I have a bank called ChoralReef with a Localized Audio Table on it. In this Localized Audio Table, I have one key: VO_Hooks_SS_Intro that points to a wav file. From what I understand from the documentation, because it’s listed in an Audio Table attached to the bank, this is added into the ChroalReef bank when I build it in FMOD Studio.

And for testing, I’ve made a 2D Timeline Event that has a Programmer Instrument with no set name. And under Edit → Preferences → Assets, I put a few Project Locales in. When I build my ChoralReef bank, it also generates banks for each locale.

Unity setup

In my Unity scene, I’ve added (a slightly modified version of) the example script and a Studio Bank Loader to a GameObject. I load the ChoralReef bank and the ChoralReef_EN (English US) bank for testing.

ss_inspector

So now when I enter Play Mode, those banks will load and the script will run.

Script setup

On the script, on Start() I tell it to PlayDialogue("VO_Hooks_SS_Intro") which is the key in the audio table.

void Start()
{
	// Explicitly create the delegate object and assign it to a member so it doesn't get freed
	// by the garbage collected while it's being used
	dialogueCallback = new FMOD.Studio.EVENT_CALLBACK(DialogueEventCallback);

	PlayDialogue("VO_Hooks_SS_Intro");
}

However in the DialogueEventCallback, while it is firing off the CREATE_PROGRAMMER_SOUND event, the result I get back from var keyResult = FMODUnity.RuntimeManager.StudioSystem.getSoundInfo(key, out dialogueSoundInfo); is ERR_EVENT_NOTFOUND.

Am I using this correctly or setting something up wrong?

Thanks for any help!

To update this: I discovered through further poking that I need to build banks through File → Build / Build All Platforms, whereas previously I was simply going into the Banks tab and building the specific bank I added the Audio Table to. Once I built everything, keyResult came back OK and everything loaded properly! Whoops/Huzzah!