problem with create game Android

Hi, now I’ve decided to build a play for Android, this is part of the games category (“Tap Tap …” the wave sells money per second / clicks), but I have a problem. I put it on the phone when I walk in it and make money (progress) in it then go out, if I go back I put it from the beginning with (Money: 0 and others). How can I play to go further while I’m out of it (even stopped) and save myself? Then (for example, in play per second I get 5 / s and when I go out for a period of time) min and I get 18,000 on the 60mins (3600sec), but I want this to be saved without the player having to press the (save) button then (load), a kind of automatica./ Please, Please help !!! !

To have it save automatically, you need to do the loading when the application starts and saving when the application closes. For when it closes, try OnApplicationQuit(), and for when it starts, put something in Awake(). This would go in a script that you have attached to a Game Object. That object would need to be there when the game ends (so OnApplicationQuit will be called) and when it starts (so Awake will be called). In Awake, you should put the reload function, and in OnApplicationQuit, put the save function. For the save function itself, investigate serialization. If you are programming in C#, here’s some documentation to get you started: Serialization (C#)

RatMole Rat, Thanks