Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 callen · Dec 16, 2015 at 08:48 PM · audiounityeditoraudiolistener

Any way to disable log message "There are no audio listeners..."?

So, as the title says, I want to stop seeing a Console log that looks like this:

 There are no audio listeners in the scene. Please ensure there is always one audio...
 There are no audio listeners in the scene. Please ensure there is always one audio...
 There are no audio listeners in the scene. Please ensure there is always one audio...
 There are no audio listeners in the scene. Please ensure there is always one audio...

But, I also want to be able to playtest my game in the editor without hearing sound effects, because I hear them looping for hours on end every day. Also, I want to stream music whilst I code, and being forced to listen to my SFX at the same time is irritating.

I can think of a bunch of sub-optimal solutions which either require changing my project structure or externally disabling sound in my OS, but what I really want to know is...

Is there actually a setting somewhere to turn this off, or at least stop it from printing every single frame?

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 coderxx · Apr 11 at 03:00 PM 0
Share

Just checking. Have you tried the obvious of hitting the "Mute" button in game view?

6 Replies

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

Answer by OncaLupe · Dec 17, 2015 at 05:02 AM

Not sure if you can disable that warning, but you can mute Unity in a few ways:

Edit > Project Settings > Audio > Disable Unity Audio (at least for Unity 5.3, never checked for this before).

Have all your audio run through an Audio Mixer and mute the main channel and/or use manual variable volume control. (Not a bad idea anyway to give players ability to adjust volumes).

If you're using Windows, you can use the volume mixer to mute Unity when you need (Likely on a Mac as well but I've never used one). If you have the volume control shown in the system tray (looks like a speaker next to the clock, normally bottom right, may need to click the chevron/arrow to expand hidden icons), right click it and choose Open Volume Mixer. Find Unity in the list of programs (or if you're testing a build, whatever you named your game) and click the speaker icon under the slider to mute just 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 callen · Dec 18, 2015 at 06:50 PM 0
Share

It's very cool that the "Disable Unity Audio" option exists. I never knew we had that (maybe like you said it's a newer option), and it's easily the quickest way to mute Unity, from within Unity, and avoid those messages. Thanks!

avatar image
4

Answer by felixfors · Dec 18, 2015 at 07:28 PM

There is a " Mute audio" button at the top right corner of the game window. No need to turn off any components or change the project settings.

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 raulssorban · May 28, 2017 at 11:56 PM 0
Share

There is but it doesn't fix it. It keeps showing up.

avatar image Bunny83 raulssorban · May 29, 2017 at 12:27 AM 0
Share

Of course it does fix the actual problem and not the problem that was introduced by the wrong workaround (i.e. the removal of the AudioListener component).

You always need exactly one AudioListener in your scene. If you have one, the error / warning is gone.

avatar image
1

Answer by pointcache · Jan 22, 2017 at 08:35 PM

Ok i managed to mitigate the "no audio listeners" useless errors with this

 using UnityEngine;
 using UnityEngine.UI;
 using System;
 using System.Collections.Generic;
 
 
 /// <summary>
 /// USAGE: create top level listener that will be enabled disabled automatically
 /// add this script to every listener, and mark top listener as default mode
 /// </summary>
 public class AudioListenerController : MonoBehaviour {
 
     public Mode mode;
 
     /// <summary>
     /// Scene is the on on camera, default is the one that will substitute the missing 
     /// </summary>
     public enum Mode {
         sceneListener,
         defaultListener
     }
     static AudioListener current;
     
     AudioListener listener;
 
     private void OnEnable() {
         listener = GetComponent<AudioListener>();
         if (mode == Mode.sceneListener)
             current = listener;
         set();
     }
 
     private void OnDisable() {
         if (mode == Mode.sceneListener) {
             if(current == listener)
                 current = null;
         }
     }
 
     void set() {
         if(mode == Mode.defaultListener) {
             listener.enabled = current == null;
         }
     }
 
     private void Update() {
         set();
     }
 
 }
 

However the stupidity of this comes from the fact that its the editor itself that fires those errors, not the engine, as a result it will just dump them all over the place even when game is on pause, as usual gloriously smart decision making.

Comment
Add comment · 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
0

Answer by sniperisa · Jan 22, 2017 at 08:11 AM

Why can that notice not deactivated? My game can be loaded as a dedicated server and i don't want it to play sounds then. If you run it as client it's fine, the client has an audio listener and plays the sounds but when it is run as a dedidcated server that notice will probably use resources it doesn't need to. And i don't want to deactivate every sound source in case the game is run in server-mode...

Comment
Add comment · 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
0

Answer by jimmycrazyskills · Dec 16, 2015 at 09:06 PM

Could you just add a audio listener, but create a script that temporarily disables all audio sources(for each through them)?

Comment
Add comment · 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
  • 1
  • 2
  • ›

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

38 People are following this question.

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

Related Questions

Audio Listener Tiny Unity (Spacialized audio ?) 0 Answers

Multiple audio recorders like Audio Listener. 0 Answers

Pitch changes when i get closer to object with audio source 1 Answer

One sound gets quieter when other is played? 1 Answer

Sound volume: How to ignore distance between source and listener? 2 Answers


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