I created a new scene and it has one audio listener attached to the camera by default. I haven’t changed it at all and I added an object that holds an audio source. Before testing out the scene, I expected only the object with the audio source to play the sound and the audio listener being enabled to only allow it so you can actually hear the audio source. What I encountered instead is that when enabled, the audio listener plays the sound of the audio source too and not just the audio source that plays the sound. This wasn’t an issue with the previous scene and has only occurred with the current one I am working on, please can anybody help?
Please share more of the setup including screenshots
Hello DevDunk, thank you for responding I have provided some screenshots below
This is what the scene looks like with everything in it
Here are the properties of the Main Camera
Here are the properties of the object that holds the audio source
I fixed the issue let me explain. The audio resource in the above screenshot is different to the one where the problem occurred however when I decided to test the program right before typing this, the audio listener was still playing the 1st audio resource when I expected it to play the 2nd audio resource that I replaced the first with on the audio source.
So I decided to completely remove the 1st audio resource out of my assets and kept the 2nd audio resource. I tested again and now it works fine since the audio listener does not play any sound.
But now the question is why did the listener play the sound of the 1st audio resource but not the 2nd?
Edit:
I added the 1st audio resource back into the assets and the problem no longer occurs so honestly I have no idea what it was about the 1st audio resource that caused the audio listener to play it.