I have a separate restart screen with a restart button and a quit button, I want to make it so that the restart button just reloads the last played level and I want to be able to do this for every level of the game
I've tried this code but it did not work
public class Restart : MonoBehaviour {
void OnMouseDown()
{
Application.LoadLevel(Application.loadedLevel);
}
}
I am pretty sure this does not work because when the player dies it opens up a new scene (the restart scene) and the loadedlevel just reloads the restart scene, so how would i reload the previous scene?
↧