Hi everyone , so i have a script which you will see in a second and basicly what i want it to do is play music trough out different scenes without restarting or stopping when going to another scene ,but i also want to stop it when my main level scene begins (BehindLocks)
but unity says expecting : ,found ;
could anyone help me out please?
this is my script
function Awake ()
{
DontDestroyOnLoad (transform.gameObject);
}
{
If(Application.loadedLevel == "BehindLocks");
audio.Stop();
}