Quit application before relaunching to specific scene

I am making a game where, if you take too long to complete the game, the universe begins to fall apart and the game “crashes” (the storyline is a little too complex and unnecessary to explain here). I will simulate the crash by setting time.timeScale to 0 to freeze everything, and then use close the application. I can use time.realtimeSinceStartup to measure time while everything is frozen. Anyway, after quitting, I want to be able to relaunch the application to a specific scene (in this case, an alternate universe). Is there a way to do this?

Basically you are asking how to save player’s progress. One way is with xml/json, the other (and the simplest way) is using PlayerPrefs

If you like videos, here’s playlist by Board To Bits Games explaining different ways it’s possible to save game data, plus, a little example of how to do what you want with PlayerPrefs:

	public bool fakeTheCrash;
	public string normalUniverseSceneName;
	public string alternativeUniverseSceneName;
	void Start()
	{
		int prefs_fakeCrash = PlayerPrefs.GetInt( "fakeCrash" );// using GetInt() because PlayerPrefs doesn't support Booleans

		if ( prefs_fakeCrash == 0 ) {// false
			UnityEngine.SceneManagement.SceneManager.LoadScene( normalUniverseSceneName );
		}
		else if ( prefs_fakeCrash == 1 ) {// true
			UnityEngine.SceneManagement.SceneManager.LoadScene( alternativeUniverseSceneName );
		}
	}
	private void Update()
	{
		if ( fakeTheCrash ) {
			fakeTheCrash = false;
			PlayerPrefs.SetInt( "fakeCrash", 1 );
		}	
	}