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
What kind of player setting have to do? need help on this.
– IndividualistHi,
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!
not the entire level, but the background in the screenshots i posted is
– PrimaveraI 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 .
You could add tags on the walkable parts using [GameObject.CompareTag()][1] [1]: https://docs.unity3d.com/ScriptReference/GameObject.CompareTag.html
– InattentiveIt 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.
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.
– CommentCheck 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.
Thank you sharing this post..https://mybalancenow.fun/.
– RundgrenIf you're encountering an issue with an audio listener, it's likely related to audio playback or recording on your device. Here are some general troubleshooting steps you can take: 1. Check Hardware Connections: Ensure that your speakers or headphones are properly connected to your device's audio output jack or USB port. If you're using a microphone, ensure it's properly connected to the input jack or USB port. 2. Test with Different Audio Sources: Try playing audio from different sources (e.g., music player, video streaming service, online video) to see if the issue
– Rundgren© 2022 - 2024 — McMap. All rights reserved.
That's ok. You can fix this with event then - I don't mean input events but: public event System.Action OnPaused; public event System.Action OnUnpaused; to which your script could subscribe to be notified when game became paused/unpaused so there zero confusion about that in the code.
– Tether