- Home /
to string.
I am trying to make a game where ou have to move your character around a maze and collect pickups. My points system however is currently using print and i am trying to make a gui displaying the points. Thanks
Answer by csteach · Nov 01, 2011 at 10:51 PM
function Update () { guiText.label = n.someGlobal; }
//that is my current code. says label is not part of guiText
please remove this answer as it isnt an answer to the question. You should ins$$anonymous$$d place this "answer" in your question text which you can edit. Reason is that Answers should if possible be the solution to the question. Not a comment. :o) Please read the FAQ for further info.
Answer by BerggreenDK · Nov 01, 2011 at 06:22 PM
GUIlayout is rather nice when you need multiple outputs.
Check this Box for instance.
http://unity3d.com/support/documentation/ScriptReference/GUILayout.Box.html
Answer by BerggreenDK · Nov 02, 2011 at 09:07 AM
Okay, so you want to keep guitext.
I just looked its reference up:
http://unity3d.com/support/documentation/ScriptReference/GUIText.html
First property mentions "text to display"... the property is .text
So you assign it like this:
{
guiText.text = Global.score.toString();
}
Your answer
![](https://koobas.hobune.stream/wayback/20220613030139im_/https://answers.unity.com/themes/thub/images/avi.jpg)