i am making a android game and i have a int variable that i want to be saved if the game is quit so when you start playing again you still have you’re highscoe. this is my code:
*#pragma strict
static var highscores : int = 0;
function Start () {
}
function Update () {
if(highscore.score > highscores){
highscores = highscore.score;
}
guiText.text = highscores.ToString();
}*
i want the variable highscores to be saved.
i can’t get it to work is there anybody else who nows how to do this?