- Home /
Question by
Iann Delgado · Mar 28, 2015 at 01:53 AM ·
scoresystemresetawake
I Need help keeping my score forever
using UnityEngine; using UnityEngine.UI; using System.Collections;
public class ScoreManager : MonoBehaviour { public static int score; // The player's score.
Text text; // Reference to the Text component.
void Awake ()
{
// Set up the reference.
text = GetComponent <Text> ();
// Reset the score.
score = 0;
}
void Update ()
{
// Set the displayed text to be the word "Score" followed by the score value.
text.text = "" + score;
}
}
Comment
What exactly is the problem? Could you also reformat this?
I want my score to be unlimited, that it doesnt reset in any scene and when i leave the game
Answer by Kiwasi · Mar 28, 2015 at 03:45 AM
Check out the video on saving and persistent data in the learn section
Your answer
Follow this Question
Related Questions
Score System not working in Flappy Bird Clone 1 Answer
Score System help 1 Answer
Staring system, problem... 2 Answers
Pickup Counter Script 2 Answers
Basic Question: Score System giving random numbers. 2 Answers