So I have a continue button on my UI pannel called continue, this will load the last played level from the previous session.
Now if there is no playerpref set and you hit continue it loads level0 which is a little splash screen that loads before the game, how can I disable the continue button loading scene 0 if there is no playerpref?
Load is attached to the UI continue button, and menu is attached to the pause menu, which will save the current level when exited back, how can I prevent level 0 from being loaded? or hide the continue button if no save can be found!
Thanks!
public void Load()
{
Application.LoadLevel(PlayerPrefs.GetInt(“currentscenesave”));
}
public void Menu() //Return to main menu
{
Application.LoadLevel(MainMenuID); //Input loaded level with MainMenuID
paused = false; //Pause false
PlayerPrefs.SetInt(“currentscenesave”, Application.loadedLevel); //Save and quit, set int
}