About halfway through a day of optimisation for a 3D open world game with 3D audio, I ran into this issue.
When I enter play mode in unity, the game audio narrows to mono playback and only activates a very few (often none) amount of events. I built a debug scene where there was just one event - a stereo spatial bike event - and that doesn’t even play! So it seems less like a performance issue (because it’s handled far more than just that event before. lots of other mono spatial bike events for AI and plenty of environment audio) and well…i dunno. It’s baffling me.
Happened while I was optimising the bike audio event. The spoke audio had a nested event within it that had another parameter for the speed of the wheel. All I did was consolidate the two events and two parameters into one. I straight up just erased one of the events for the mono event. I also consolidated some separate Spatializers into one on the master channel (initially had spatializers on separate channels for different drop offs).
So…it should have improved the performance, right? Well, it does seem like it’s something unrelated but i thought i’d note down what i was doing in case it’s helpful.
One very strange thing and potentially important thing:
When I stop the play mode, I can momentarily hear the spatial audio. In the time that it takes between clicking stop and it fully stopping, the audio is…fine! Normal event.
Uploading a profiler pic of the moment I stop play mode and the 5.1 spatial audio STARTS!
bonus weird bit!
here’s the 3D view of the SINGLE stereo bike event during the (mono) play mode
and after stopping the play mode (when it goes to 5.1)
the bike event is a few units in front of the listener (where it should be)
So why the hell are there a scattering of events behind and to the left when there’s only the one bike event active in the scene?
What the hell does all this mean? I’ve checked with the programmers, nothing has changed on their side. Seemingly the audio works fine on their end AND I can hear everything normally when I do a build…so it’s a local issue?
I have reinstalled Unity 2019.3.10f1 and recloned the repo. I’m really unsure what the issue is here.