I am currently working on a small game/project to begin testing how FMOD is integrated into Unity. Everything was going really well but then it was time to build and the game runs completely differently.
A little background: The main character has a whirring sound that plays whenever you move (parameter script in FMOD), and a hologram that appears when you hit space bar(FMOD). The game starts inside a shed, where you can run into the walls and make a loud metal noise when you hit them (achieved using one-shots activated through a script). As you walk out you pass a tv that plays music (achieved through FMOD Studio Event Emitter). Outside, there are a few creatures who have sounds attached to their animation. So like a wolf that howls (script reference on animation that one shots sound), a squirrel that chitters (same as wolf), a whale that wails (FMOD Studio Event Emitter). Go a little farther and there’s a maze where the farther you get inside the more dynamic the music is (achieved using script that activates every time character goes through collider).
So, the issue. In the first build, if you approached the right side of the shed, you would hear the tv music even though the tv was much further. You would also hear the whale through the walls, even though i had already made an occlusion script.
For the second and third builds, I completely turned off the emitter from the TV, but you could hear it in the build, and then I just deleted the sound from the project, but you can still hear it in the build.
For the fourth build, I did not know what was happening so as a test I just turned off the FMOD Studio Listener, attached to the camera (and to preface, there is only one listener active in the scene, I do not have any built in Audio Listeners in the scene, and I did use the hierarchy/reference bars to check just in case). So theoretically there should be no sound, at all.
However, upon building the game, here is what happens:
In the shed, you can still hear the TV Sound, even far away from the TV and with the file deleted, in the back-right of the shed. However, once you get it started, it plays no matter where you are. Further more, the noise that happens when you hit the wall occurs only on the right side of the shed, not the left side.
You cannot hear the squirrel or the wolf, but you can hear the whale.
You cannot hear the whir of the character, but you can hear the hologram when you hit space.
When you enter the maze, the music plays as normal, albeit with the TV sound playing over it.
I am completely at a loss here. Some FMOD sounds play, some don’t. Some sounds that were just implemented through scripts play, some don’t. The Studio Listener is off. Some files have been deleted. I have checked every object one by one to make sure there’s not another Listener hidden somewhere. I have scoured each part of the shed to make sure there’s not some weird audio on the right side of the shed.
I feel like I’ve run out of options. It runs fine in-engine, I don’t know what’s wrong.
If anybody has any ideas, please let me know. Thanks a lot for reading.