Should i save score using playerprefs for android / ios ?

If yes, then please guide me how ? Point me to any example which saves data variable.

How do i need to use -
I need to save 2 variables

  1. Score [This will keep on increasing everytime i play the game]
  2. Coins [These will be added and subtracted whenever i will play the game]

Please show me the way to achieve this.

Thank you so much for your time.

PlayerPrefs.SetInt()
PlayerPrefs.GetInt()

How can i use it ? Think a script i can join to camera and experience this

public int playerScore = 0;

void Start()
{
    playerScore = PlayerPrefs.GetInt("PlayerScore", 0); // Defaults to a score of 0 if you don't have one
}

void OnApplicationQuit()
{
    PlayerPrefs.SetInt("PlayerScore", playerScore);
}

*Note, untested.

KyleOlsens scripts should work fine.

We used PlayerPref to save and load highscores and the likes in one of our games, and its perfect for iOS.

Much easier than to somehow get access to files in a device.