Audio Listener Problem
Asked Answered
C

6

0

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?

Carder answered 5/4 at 12:59 Comment(1)

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
C
0

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).

Chincapin answered 4/9, 2018 at 16:10 Comment(0)
G
0

Activate spacial sound in player settings

Gurule answered 4/9, 2018 at 16:54 Comment(1)

What kind of player setting have to do? need help on this.

Individualist
A
0

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:

151856-searchcomponent.jpg

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!

Amby answered 6/6, 2023 at 4:27 Comment(1)

not the entire level, but the background in the screenshots i posted is

Primavera
F
0

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 .

Femininity answered 7/8, 2022 at 4:7 Comment(1)

You could add tags on the walkable parts using [GameObject.CompareTag()][1] [1]: https://docs.unity3d.com/ScriptReference/GameObject.CompareTag.html

Inattentive
G
0

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.

Glaab answered 22/5, 2023 at 6:43 Comment(1)

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.

Comment
C
0

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.

Comment answered 5/4 at 12:58 Comment(2)

Thank you sharing this post..https://mybalancenow.fun/.

Rundgren

If 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.