All sounds and events play fine in editor mode but problems arise when building the game

So far FMOD has been great in adding music and sound effects to a unity game I’m working on with settings easy to change and instant to hear after building banks. However, when building the game it seems like all of the volume settings I have changed aren’t active and sometimes events play twice. This is strange because everything is perfect in the editor.

I have tried live update and grouping each set of events in the mixer together but it is the same. I first thought it was because I balanced volumes in each event instead of in the mixer but this doesn’t seems to be the case. The latest banks are built so that can’t be the issue either.

This is the last issue to be fixed before the game is finished so thanks to anyone who can help.

You may have missed something with the routing. What do you mean exactly by “the volume settings I have changed”? Changed from… what?

Concerning events playing twice, it’s hard to say ; it should be a bug in the code. Did Live Update confirm that?

Thank you for replying. By the volume settings I mean the volume knobs on the master track and single instrument parts of the events. For example, a firework sound effect was too loud so I decreased the decibels on the volume knob on the event. However, when playing the built version of the game the firework was just as loud as it would be if the fader hadn’t been adjusted. The editor version does not have this problem and it sounds as I set it in FMOD.

I might have narrowed it down some more: Some sound effects don’t have the pitch modifier I put on them either so it might be that it just doesn’t recognise changes made in the ‘single instrument’ part at the bottom when you click on the audio file?

As for the events playing twice: if the code was wrong wouldn’t it also play twice in the editor not just in the built version? This is my first FMOD project so could you specify how live update would confirm if it was a bug? I just used it to see if the music group bus was working.

That sounds as if the banks used in the built game were out to date. I know you said you’ve built the latest FMOD banks, but maybe double check that.

Yes, probably. I first thought you were talking about FMOD event editor.

However, you should check all this with Live Update. For the volume problem, tweak the faders in FMOD Studio, activate/bypass the effects, while playing the game, and see if it does what it should, in real time. For the events playing twice, confirm that in the profiler’s API calls:

Also check this summary I just did on volume modifiers: Problem with volume Fmod / Unity / DAW - #4 by Alcibiade

I have found the issue and fixed it. While using the profiler I found that FMOD played the sound effects correctly at the right volume so I assumed that then there must be something wrong in unity and then it dawned on me that old audio files which were first implemented before I decided to try FMOD had been causing the issues and sure enough after they were deleted there were no issues. This is still strange to me because the audio listener for these files had been deleted which is why there was no problems in the editor but then in the build version it must have somehow created an audio listener or just played the files without it. This had been causing the events to play twice and the volume inconsistencies.

I feel pretty stupid now and feel sorry for wasting your time but you did help me discover how useful the profiler can be. Thanks for helping.

1 Like