So for my game I want to have it so when the player loses on level 2 and decides to go back to the Title Screen he is able to load the game on level 2.
Here is an example of what I mean. This is what it looks like when the player loses on level 2.

if the player clicks on back that will lead him to the title screen
This is the title screen
When the player clicks load I want to load level2
My level 2 is a scene called “Final1”
Here is my Code
#pragma strict
public var level:String;
public var sound4: AudioClip;
public var Metal_Impact_Hollow: AudioClip;
function Start ()
{
}
function Update ()
{
}
//if the mouse is on the object
function OnMouseDown()
{
if(level.Equals("Quit"))
{
Application.Quit();
}
else
{
Application.LoadLevel("Final1");
audio.Play();
}
}
function OnMouseEnter ()
{
audio.Play();
}
This is my teacher’s code that he uses for button presses. This script is attached to my Load Button.
Not sure how to write it out. But this is what I want:
if Character was on Final 1 then load Final 1
