AudioSources don't play when setting Time.timescale to 0

I’m using the standard trick of setting Time.timescale = 0 to pause my game. Then I present buttons when paused to restart the level, go to the main menu, mute, shop, etc. I want to play a consistent button sound across all UI buttons when clicked, but when in game pause, my button clip doesn’t play immediately. I assume that Time.timescale=0 tells Unity to also pause new audiosources. Is there any way around this and to make them play immediately? I can’t find anything on the forum or in documentation. Thanks.

I got this problem as well today. I found a silly solution.

Just do this;

Time.timeScale = 1;
audio.PlayClipAtPoint(sfx.soundTest, Camera.main.transform.position, 1.0 ); 
Time.timeScale = 0;

The “One Shot Audio” objects accumulate in the hierarchy while the timeScale is 0, but they all go away once the timescale is 1 for a full frame again.

AudioSources play independently of Time.timeScale - probably the code that should call Play() is being stopped when timeScale becomes 0. If you use the code below, the sound assigned to audio.clip will be played anytime the button pause is clicked (attach this code to the object that has the AudioSource):

private var pause = false;
private var lastValue = false;

function OnGUI(){
  pause = GUI.Toggle(Rect(10,10,200,60), pause,'Pause');
  if (pause)
    Time.timeScale = 0.0;
    Time.timeScale =  1.0;
  if (pause != lastValue){ // if pause changed...
    lastValue = pause;
    audio.Play(); // play the sound

Don’t use audioSource.PlayOneShot(audioClip), it will wait until Time.timeScale will be greater than 0.
Use audioSource.Play() asigning before audioClip to AudioSource.

Sometimes, people use Time.timeScale = 0f and AudioListener.pause = true or AudioListener.volume = 0. In these cases, you must set these AudioSource properties to true:

audioSource.ignoreListenerPause = true;
audioSource.ignoreListenerVolume = true;