We are using FMod as our main Audio engine in a Unity game build. We use Pixel Crushers for the dialogue system. Does anyone have experience triggering FMod Dialog audio cuts to match text from Pixel Crushers dialog system?
Hi,
Could I grab some info,
What version of FMOD are you using?
How are you playing the dialog using FMOD? e.g. Programmer instrument (FMOD API | Studio API Guide - Dialogue and Localization)
Could I get a code snippet of how dialogue cuts are handled?
Hi Connor, I believe the programer is using Pixel Crushers for the Dialogue system in Unity. We just finished recording audio from voice actors to match the dialogue. I assume I will need to make parameters that are triggered by certain pixel crushers commands- maybe the dialog lines themselves can be tagged to match FMod parameters we make. We are still planning how to get everything to work together. I check on the FMod version I have. I typically update when I get a notice.
Hi,
We have a Unity scripting example outlining how to use programmer instruments: Unity Integration | Scripting Examples - Programmer Sounds, which may be useful when planning your implementation.
In the example, input is used to trigger the dialogue audio
void Update()
{
if (Input.GetKeyDown(KeyCode.Alpha1))
{
PlayDialogue("640148main_APU Shutdown");
}
if (Input.GetKeyDown(KeyCode.Alpha2))
{
PlayDialogue("640165main_Lookin At It");
}
if (Input.GetKeyDown(KeyCode.Alpha3))
{
PlayDialogue("640169main_Press to ATO");
}
}
What I would suggest is using a similar system to call the PlayDialgue()
function but triggered by the Pixel Crusher
commands. When dialogue is skipped you can use the EventInstance.stop(FMOD.Studio.STOP_MODE.IMMEDIATE)
to cut the audio.
Let me know if that helps!
Connor,
Thanks for the help! Some of it makes sense to me, but I will get to to our programer, who will completely understand the script lol. I really appreciate the help!
Chris
7SP
All good, if you have any more questions please do not hesitate to ask!