OnApplicationQuit

So. I’ve read the OnApplicationQuit() thing in the Docs around 50 times now. And i still have no clue how to Save my WHOLE game state. How would i go About saving a virtual pet game, I have Items you can Buy, Incemental systems and a simple day and night cycle. O Also read about Player Prefs but how would i go about it. I Really tried like a Gazillion times and it didn’t work. And once i’ve saved i’d like it to load it automaticly every time i run the game. I don’t have any Scripts to this, i heard something about Serialization. I need explainations ._. (Working in Unity 5.4b)

First of all, to be able to save your gamestate, you should begin by thinking about exactly what variables you have to save… Then you could write some wrapper classes that hold these values. You can then, when exiting the application save all those objects via serialization (basically writing an object as a stream of bytes, read more about this yourself please :D).
To load all this you could add a gameobject to your startup scene that reads the created files back in in its start method…
Those are only very general tips I can give you, but you have to specialize this basic system for your project yourself, as I don’t know what exactly you are trying to save…

Save examples:

PlayerPrefs.SetString("petName","Bleackk");
PlayerPrefs.SetFloat("petHealth",25);
PlayerPrefs.SetInt("upgradeLevel",3);

Load examples:

string tempPetName = PlayerPrefs.GetString("petName");
float tempPetHealth = PlayerPrefs.GetFloat("petHealth");
int tempUpgrade = PlayerPrefs.GetInt("upgradeLevel");

assign the temp values to whatever you want.