Version: 2018.3 (switch to 2019.1)
LanguageEnglish
  • C#

PlayerSettings.muteOtherAudioSources

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual
public static bool muteOtherAudioSources;

Description

Stops or allows audio from other applications to play in the background while your Unity application is running.

This setting is shared between iOS and Android platforms.

Set this to true and your Unity application stops audio from other applications in the background, set to false and audio from background applications continues to play alongside your Unity application.

Note: Starting with Android Marshmallow (6.0), setting this to false mutes the sound of your Unity application during an incoming phone call (while the phone is ringing). If you want to have this behavior on older Android versions, you have to add the READ_PHONE_STATE permission to the manifest. See the Android documentation for more information on build manifests.

Did you find this page useful? Please give it a rating: