Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Grady · Jul 02, 2011 at 07:50 AM · audiolistener

Audio Listeners?

Hey guys,

In my error console, it says that I have 3 Audio Listeners, and I have no idea what on earth this means.

It says to ensure that there is always only one in the scene....? I'm sure you know what I'm talking about....

Can someone please tell me how to fix this....

thanks

-Grady

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image GuyTidhar · Jul 02, 2011 at 07:52 AM 0
Share

Are you using Unity 3?

3 Replies

· Add your reply
  • Sort: 
avatar image
6
Best Answer

Answer by GuyTidhar · Jul 02, 2011 at 08:00 AM

This means you have more then one component in your scene which is responsible for receiving sounds played within the scene.

You might have a few cameras which by default come with an AudioListener component.

You should make sure only one of them is active at a time, so if you switch cameras disable the component (or the whole gameObject) before switching to a new camera and enable the one on the switched to camera.

You might also just keep 1 AudioListener in advance in your scene on a whole different gameObject and remove the rest.

To find all your AudioListener components in your scene go to the hierarchy window's search field, click the little arrow to the left of it, select "Type", and then write in the serah box: "Audiolistener". Now your search will show you all game objects that have AudioListeners on them. Don't forget to select "ALL" again in the search box after you are done...

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Grady · Jul 02, 2011 at 08:07 AM 0
Share

Thanks :D !!!

avatar image theoldman1774 · Sep 19, 2014 at 01:17 PM 0
Share

$$anonymous$$y says Unable to open Assests/Standart Assests/Terrain Assests, or whatever it is... If your a pro, please help

avatar image xMarcinx · Feb 11, 2015 at 12:25 PM 0
Share

Thanks :)

avatar image apostlecephas · Jan 13, 2017 at 02:35 AM 0
Share

I appear to only have the "Type" option under Projects not Hierarchy is that a pro only feature?

avatar image apostlecephas apostlecephas · Jan 13, 2017 at 02:39 AM 0
Share

nvm found it but it doesn't work comes up empty when you search by type. oh well guess ill just look at everything one by one because I know none of my cameras have audiolistener but my main.

avatar image
1

Answer by ravin5432 · Oct 25, 2017 at 12:51 AM

I only have one camera, Iv checked all 5 of the game obj in the scene, and cant find the other audio listener. I think its a bug. I was just working with the GUI on a new scene, when out of nowhere the error popped up for a 2nd audio listener. It would be nice if there was a way to search for it.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JorgeAmVF · Mar 14, 2018 at 10:49 AM 0
Share

I wasn't able to search for the audio sources, but they were attached to the cameras and I needed to unmark them in order to listen to an actual sound source.

I could easily find them on the Inspector tab though.

avatar image
0

Answer by save · Jul 02, 2011 at 08:21 AM

Audio Listeners is the ears of your player and is found on each camera. You probably have three cameras, the trick is to disable each camera and corresponding Audio Listener except the one you want to use when you switch between them.

I whipped up a script for you which is ready to go, just attach it to your main camera (or any other object which is enabled for the whole scene):

 var cameras : Camera[]; //Attach your cameras in the Inspector to this variable array
 private var currentCamera : int = 0;
 
 function Start () {
     switchCameras(false);
 }
 
 function Update () {
     //Switch camera when user press "C"
     if (Input.GetKeyDown(KeyCode.C)) {
         switchCameras(true);
     }
 }
 
 //The function either resets the cameras or switch
 function switchCameras (switchCam : boolean) {
     if(currentCamera+1<cameras.Length && switchCam) {
         currentCamera++;
     } else {
         currentCamera = 0;
     }
     for (camera in cameras) {
         camera.enabled = false;
         camera.GetComponent(AudioListener).enabled = false;
     }
     cameras[currentCamera].enabled = true;
     cameras[currentCamera].GetComponent(AudioListener).enabled = true;
 }
Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image save · Jul 02, 2011 at 08:33 AM 0
Share

This is of course if you have different angles for a player (for instance exterior, interior and rear view of a car).

avatar image Grady · Jul 02, 2011 at 08:47 AM 0
Share

thanks, i used it and it works

-Grady

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Getting Unity to listen to desktop audio 2 Answers

Volume rolloff: Distance to listener not changing. 3 Answers

Is it possible to raise an audio sources pitch as an audio listener gets closer? 5 Answers

Having a problem with Audio Reverb Zones. 0 Answers

Music goes crazy on rotating camera? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges