- Home /
How to make a Score GUI.
Hi I am making a simple 2D soccer game in Unity. It is my first "game". I am wondering how to make GUI Text display the score I have. I already made the scores so when the ball goes in the net it adds one to the score. Well that's all great and all but now I need to know how to display it. The problem is that the scores are in the net scripts and I am making a score script to display the score. How do I access the variables I made in the other script? and how do I make GUI text display the score variables.
There are several ways of structuring this interaction. You can start with this page:
http://docs.unity3d.com/412/Documentation/ScriptReference/index.Accessing_Other_Game_Objects.html
And to change the text of a GUIText object, just assign the GUIText.text of the object.
Your answer
Follow this Question
Related Questions
3D ^ Custom GUIText/Label or Making a Score System without using GUI? 0 Answers
GUI Text Score counter 3 Answers
Animating Transitions for GUI Results 0 Answers
Currency score increase on pickup 1 Answer