Search Unity

save score even when quit the game

Discussion in 'Scripting' started by maubar, Oct 27, 2017.

  1. maubar

    maubar

    Joined:
    May 27, 2015
    Posts:
    128
    hi ..
    just to know ....to do this..
    i kno how to save score on game fly,
    using:
    Code (CSharp):
    1. public class ExampleClass : MonoBehaviour {
    2.     void Example() {
    3.         PlayerPrefs.SetInt("Player Score", 10);
    4.     }
    5. }
    but i need to save score when quit game to reload (RESUME GAME) later.
    is is posible ?
    any idea ?
    i will apreciate so much. :)
     
  2. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,713
  3. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    5,066
  4. GameDevCouple

    GameDevCouple

    Joined:
    Oct 5, 2013
    Posts:
    2,423
  5. maubar

    maubar

    Joined:
    May 27, 2015
    Posts:
    128
    do not get excited ... but I love you (FORUM) !
     
  6. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,713
unityunity