Android Games Save/Load

I’m developing my android game is there a way how to save and load a game,
current position of the player and coins count
i’m using Complete Physics Platformer Kit and Mad Level Manager
or anyone knows how to do it? like when you press the save button it will save player current position and coin count etc…and if you will exit the game and if you will press load button the game will load


Check this out:

This is the method I use and it works great. Only time problems arise is when you try loading a file when you have saved different information on it. For example saving mana points. Then later you decide not to use mana and try adding something else to save. When you load that on android it messes everything up. A fix is use a different file name.

saving for games is like pressing a button but for us who create the games is not easy like that ;

u should save each variable and load them ;

for example if u want to save the coin amount u should do it like this :

    public int coinAmount;

// call this where ever u want to save the coin variable
 PlayerPrefs.SetInt("CoinNumber", coinAmount);

then when u want to get it in the next lunch of the game u should do it like this :

   void Start()
        if ( PlayerPrefs.HasKey ("CoinNumber"))  // check if we already save It before

            coinAmount = PlayerPrefs.GetInt("CoinNumber");



            coinAmount = 0;


u should save all of your variables like this and load them again ;

i suggest u to watch some youtube tutorial just search “PlayerPrefs in unity”
there are very good tutorial on who to do this ;