Hi all! Long time lurker first time poster here.
I am building a game in Unity and just recently updated both my FMOD studio and FMOD studio Unity integration version from 2.0 to 2.02.15.
In my game I am using the keyOff function in a Unity monobehavior ( formerly triggerCue() ) to advance a tutorial narration in my game incrementally. I set sustain points, have a couple of transitions controlled by params to control what is played at specific times.
When using FMOD 2.0 and the triggerCue() function, the sustain points and transitions worked perfectly. Whenever triggerCue() was run, the audio in that event played until it reached a sustain marker, as intended.
However since upgrading, my event does not play correctly. Specifically, I have some audio that plays when my scene begins which leads to a single sustain marker. After keyOff is run in my game, the audio then plays until it hits a bit of a Transition Junction, where if a specific param (AirPods) has a value of 1, the audio jumps to a specific region, and if the param (AirPods) has a value of 0 it goes somewhere else.
When keyOff is used, audio always pauses correctly at the first sustain marker, however when it gets to the "Transition Junction” BOTH lines from opposite areas in the event play at the same time. So for example if the AirPods param value is 0, the audio that is supposed to play is heard, along with the audio that would play if the value was 1. They both play at the same time.
Additionally, one of two sounds heard follow the correct sustain points and pauses correctly, while the other sound playing at the same time advances through the event without stopping or pausing at all. So there is a lot of overlap.
The ONLY change in my code is the updated function, replacing the depreciated triggerCue() with keyOff(). This code works perfectly in FMOD version 2.0 with the triggerCue().
I’ve tried reinstalling FMOD, updating Unity and even tried a few “pseudo tricks”, like adding a loop region of silence in FMOD studio in hopes it would stop one of the two double audio portions being played. But nothing I do seems to work.
The Unity function that controls this is a button. When pressed the following function is run:
public void GamelevelCue() {
gamelevel.keyOff();
}
Below is a screenshot of my FMOD studio event with the sustain points and transitions:
I made a backup of my game before I updated FMOD and tested the same code and studio project using FMOD 2.0 and triggerCue() and it works correctly. So it seems to be an issue with either keyOff(), FMOD 2.02.15, or an error within my FMOD project.
To try to fix this I’ve tried:
- Restarting Unity
- Restarting FMOD
- Removing and Reinstalling FMOD 2.02.15 (Studio and Unity integration)
- Rebuilding the event that’s having trouble
I would truly appreciate any help or suggestions on how I can get this to work again!
Thanks!