preventing music from stopping ingame

i have this music running while game is playing, and when the player dies, the map reloads by:
Application.LoadLevel(Application.Loadlevel);

but thyen the music stops…
can i reload the scene without the music starting over? :face_with_spiral_eyes:

Look into DontDestroyOnLoad.

I recommend you call that on the object playing your music, as well as putting a script on that object which, before it starts playing music, checks to see if there is already music playing (otherwise, the music will play on top of itself).

well that solves my problem, but im still a newbie to scripting… is the checking for music something you can help with?

here is what i have come up with

using UnityEngine;
using System.Collections;

public class KeepTheMusic : MonoBehaviour {

public bool musicIsPlaying = false;

void Update(){
if (musicIsPlaying == false){
DontDestroyOnLoad(transform.gameObject);

musicIsPlaying = true;
}
}
}