- Home /
High score in standalone
This my 1st time actually using unity. i am unable to figure out how do i save,load high score details using xml format since not wanting to connect it to any servers.Found a few script that use www as a link for the game to the server but i got to use a xml format so as it is able to store, display on the standalone.
Can anyone show me a good site or mayb a script so i can take example from?
ofc man try to use this script! I use it!
public static var score: int;
var scoreText = "Score:";
function OnTriggerEnter( other : Collider ) {
Debug.Log("OnTriggerEnter() was called");
if (other.tag == "Coin") {
Debug.Log("Other object is a coin");
scoreText = "Score: " + score;
Debug.Log("Score is now " + score);
Destroy(other.gameObject);
}
}
function OnGUI () {
GUI.Label (Rect (250, 35, 100, 200), scoreText);
}
Answer by efge · Mar 16, 2011 at 11:41 AM
You could take a look at the Wiki Scripts Section and search for XML.
There are some Scripts and Code Snippets available.
Your answer
![](https://koobas.hobune.stream/wayback/20220613113133im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Score System help 1 Answer
can xml be used in anrdoid?? 1 Answer
Javascript score problems whilst referencing scripts. 2 Answers
How to make using a power-up affect score? 1 Answer
Points when an enemy dies. 2 Answers