Hi, I’m using unity version 2018.2.6. The audio sources don’t decrease o raise the volume when they get closer o far from the audio listener. And when I click to turn off the main camera audio listener, any audio source set in the scene still playing. Why does this happen? Do I need to use another method to control these two process?
have you got two audiolistener in the scene? there can be just one.
furthermore i’d have a look if your audiosource 3d settings are correct(distance, fallof volume etc).
Activate spacial sound in player settings
Hi,
Have you checked that your Audio Source’s ‘Spatial Blend’ parameter is set to 3D?
This allows the object that is emitting sound to appear louder or quieter when closer or further away to an audio source in 3D space. You can also adjust the distance in the 3D Sound Settings below.
The fact that you can still hear audio when you turn off your main camera audio listener might mean that you have another audio listener in your game. You can search for components attached in your scene by using the Search bar in the Hierarchy menu:
Simply find the other audio listener (if you have one!) and remove it, or handle it differently.
Bit late to the party, but hope this helps!
I used unity 2018. 4.36 lts the same problem happend but I think I found a way,.
Set Spatial Blend to 3D in the Audio Source, also just make sure to adjust the min and max inside (3D Sound Settings - logarithim rolloff) now just move close and far the GameObject that has the Audio Listener, even if you are in a 2D space world it should works .
Check that you have an Audio Listener component attached to your main camera.
Make sure that the Audio Listener is set to active and enabled.
Check that the volume levels of your audio sources are set correctly.
Ensure that the audio clips you are using are not corrupted or in a format that is not supported by Unity.
Check that your audio sources are positioned correctly in relation to the Audio Listener, and that they are not obstructed by any objects in the scene.https://www.mybkexperience.onl/
It seems like you’re experiencing issues with the audio sources and audio listener in Unity 2018.2.6. To address the volume issue when the audio sources get closer or farther from the audio listener, you need to ensure that the audio source’s spatial blend is set correctly. Additionally, to stop audio sources from playing when the main camera’s audio listener is turned off, you can use a script to control this behavior.
Thanks for sharing.