using UnityEngine;
using System.Collections;
public class SoundManager : MonoBehaviour 
{
	public static SoundManager control;
	AudioSource audioSource;
	public AudioClip[] audio;
	public bool isPlaying;
	void Awake() 
	{
		if(control==null)
		{
			DontDestroyOnLoad (gameObject);
			control=this;
		}
		else if(control !=this)
		{
			Destroy(gameObject);
		}
	}
	void Start()
	{
		audioSource = GetComponent ();
	}
	void Update()
	{
		if (Application.loadedLevel == 0 || Application.loadedLevel == 1) 
		{
			ChangeSound ();
		} 
		else if (Application.loadedLevel == 3) 
		{
			if(!isPlaying)
			{
				audioSource.clip = audio [1];
				audioSource.Play();
				isPlaying=true;
				print("playing");
			}
		}
	}
	void ChangeSound()
	{
		isPlaying=false;
		audioSource.clip = audio [0];
	}
}
Any error  or logic that i miss?  I check that it print "playing"  but no sound is playing .
Edit * done * 
if forget to check one time playing , it loop the playing function , that why is no sound is playing 
                       
                           
                       
                     ↧