AudioListener.pause Manual     Reference     Scripting  
Scripting > Runtime Classes > AudioListener
AudioListener.pause

static var pause : boolean

Description

The paused state of the audio. If set to True, the listener will not generate sound.

Similar to setting the volume to 0.0.

JavaScript
AudioListener.pause = true;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Example() {
AudioListener.pause = true;
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Example():
AudioListener.pause = true