void OnGUI()
    {
        GUI.backgroundColor = new Color(0, 0, 0, 0.7f);
        GUI.skin.button.normal.background = new Texture2D(1, 1);
        GUI.skin.box.normal.background = new Texture2D(1, 1);

        GUI.Box(new Rect(0, 0, Screen.width, 50), "You can attach the sound to either the sound manager or the game object of your choice. The benefit in this is if you are using 3D sounds." +
                    "Keey the SoundManager and an AudioListener on the players point of view, and add sounds to gameobjects around you to hear them correctly in 3D");

        if (loopingAudioSource == null)
        {
            if (GUI.Button(new Rect(0, 50, Screen.width, 30), "Play Sound Once, Add To Sound Manager"))
                SoundManager.PlaySoundOnce(playOnceSound);

            if (GUI.Button(new Rect(0, 80, Screen.width, 30), "Play Sound Once, Front"))
                SoundManager.PlaySoundOnce(playOnceSound, front);

            if (GUI.Button(new Rect(0, 110, Screen.width, 30), "Play Sound Once, Right"))
                SoundManager.PlaySoundOnce(playOnceSound, right);

            if (GUI.Button(new Rect(0, 140, Screen.width, 30), "Play Sound Once, Rear"))
                SoundManager.PlaySoundOnce(playOnceSound, rear);

            if (GUI.Button(new Rect(0, 170, Screen.width, 30), "Play Sound Once, Left"))
                SoundManager.PlaySoundOnce(playOnceSound, left);

            if (GUI.Button(new Rect(0, 200, Screen.width, 30), "Play Sound Looping"))
                loopingAudioSource = SoundManager.PlaySoundLooping(loopingSound);
        }
        else
        {
            if (GUI.Button(new Rect(0, 50, Screen.width, 30), "Stop Sound Looping"))
            {
                loopingAudioSource.Stop();
                loopingAudioSource = null;
            }
        }

        SoundManager.I.volume = GUI.VerticalSlider(new Rect(Screen.width / 2 - 15, Screen.height - 300, 30, 300), SoundManager.I.volume, 1.0f, 0.0f);
        SoundManager.SetVolume(SoundManager.I.volume);
        float yPos = Screen.height - (300 * SoundManager.I.volume) - 15;
        GUI.Label(new Rect(Screen.width / 2, yPos, 300, 20), SoundManager.I.volume + " VOLUME");
    }
    /// <summary>
    /// Play the playlist from the beginning
    /// </summary>
    public void Play()
    {
        if (audioClips.Count <= 0)
            return;

        if (shuffle == true)
            audioClips.ShuffleContents();

        currentAudioClipIndex = 0;
        currentAudioClip = SoundManager.PlaySoundOnce(audioClips[0]);
        currentAudioClip.RegisterAudioCompleteDelegate(CurrentTrackComplete);
    }
    /// <summary>
    /// This will be called on the current track ending. All handling of next track and playlist ending occurs here
    /// </summary>
    /// <param name='s'>
    /// S.
    /// </param>
    void CurrentTrackComplete(EnhancedAudioSource s)
    {
        if (currentAudioClip == null)
            return;

        currentAudioClip.RemoveAudioCompleteDelegate(CurrentTrackComplete); //remove our old deleagte

        if (repeat != RepeatOptions.Song) //this will make sure we play same song if we have it on repeate song
            currentAudioClipIndex++;

        if (currentAudioClipIndex >= audioClips.Count) //we are at the end of our playlist
        {
            currentAudioClipIndex = 0; //reset

            if (repeat == RepeatOptions.All) //if we are repeating, then play again!
                Play();
            else
                if (onPlaylistComplete != null) //call the playlist completion delegate
                    onPlaylistComplete(this);

            return;
        }

        currentAudioClip = SoundManager.PlaySoundOnce(audioClips[currentAudioClipIndex]); //if we hit here we need to play the next song in the list
        currentAudioClip.RegisterAudioCompleteDelegate(CurrentTrackComplete);
    }