Can you please tell me what is the benefit of using audio tables for a large number of dialogues, instead of creating a separate event for each phrase? And how problematic is it to work with these tables? Thanks in advance for the answer!
There are two advantages to using audio tables instead of creating one event for each line of dialogue.
The first is that it saves you a considerable amount of effort. Dialog events are often identical in all respects, save for the line of dialog to be played. This means that they’re almost completely interchangeable: If you could change which line of dialog was played each time a dialog event was triggered, you could use the same dialog event for each and every line of dialog in your game, instead of having to create hundreds of practically-identical events - and that is exactly what programmer instruments and audio tables allow you to do. Granted, your game’s code will have to specify which line of dialog will play every time a line of dialog is played - but your game’s code would need to do that anyway, so it’s not actually any harder.
The second advantage of using audio tables is that it simplifies localization. If you use audio tables, you can easily switch out one language for another by using our localized audio tables feature, without having to manually edit your dialogue events to change which assets are used in their instruments.
Not problematic at all, if we’ve done our job right!
All you need to do is put your dialog lines in a folder, add an audio table to one of your banks, and set the audio table’s path to that folder. This will result in the files in that folder being included in the bank when you build it. Then, your game’s code will be able to select any of the audio files in that table to play whenever you need it.
Hello! Thanks for the reply! I tried to make a test scene, with a table containing 7 phrases. I based it on this example https://www.fmod.com/docs/2.02/unity/examples-programmer-sounds.html
But something works wrong, when called by any key, only the first phrase is played. What can be the mistake?
What code are you using to specify which line of dialog should play?