- Home /
Score system in C# [fixed]
EDIT:
It's fixed.
Comment
Answer by arkon · Jun 08, 2012 at 04:33 AM
Add an OnGUI function to overlay your score or list on the screen using something like GUI.Label like this:
at the top of scope add this:
int score = 0;
string score_txt;
public Rect ScorePos;
public GUIStyle ScoreStyle;
void OnGUI()
{
GUI.Label(ScorePos, score_txt, ScoreStyle);
OR
GUI.Label(ScorePos, score.ToString(), ScoreStyle);
}
Thanks, I'll try this :).
EDIT:
Should I add this to my script or make a new C# script? I am a bit lost where I need to place this.
Your answer
![](https://koobas.hobune.stream/wayback/20220613072500im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Highscores PlayerPrefs Sorting Issue 2 Answers
Scoring System 1 Answer
Score isn't adding when the combo timer runs out like it's suposed to, Whats wrong? 1 Answer