Search Unity

Save System...

Discussion in 'Scripting' started by guitarmaster18, Dec 30, 2007.

  1. guitarmaster18

    guitarmaster18

    Joined:
    Nov 22, 2007
    Posts:
    6
    Well, I've been searching the web for hours without avail. My question is how would you implement a save system in JavaScript to, say, save your score in a game?

    Thanks! :D
     
  2. JohnGalt

    JohnGalt

    Joined:
    Nov 27, 2007
    Posts:
    85
    Saving to a file?

    Look for TextWriter for example. The examples you will find will be probably written in C#, but the objects involved are the same that in javascript
     
  3. guitarmaster18

    guitarmaster18

    Joined:
    Nov 22, 2007
    Posts:
    6
    Ok, but how do I tell my game to load the variables that I told TextWriter to write?

    Thank you for your reply :D
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Just use PlayerPrefs for simple data like a score.

    --Eric
     
  5. guitarmaster18

    guitarmaster18

    Joined:
    Nov 22, 2007
    Posts:
    6

    Thank You :D