- Home /
String not showing up in GUI label
var myString : String;
var myFloat : float;
function Start () {
}
function Update () {
myFloat.toString(myString);
}
function OnGUI () {
(GUI.Label (Rect(25, 25, 100, 50), myString));
}
I'm not sure how it is supposed to be. The GUI is not showing up. Why isn't this working and how do I fix it?
Comment
Best Answer
Answer by Itinerant · Nov 02, 2012 at 09:09 PM
Hmm, replace your Update function with this:
`myString = myFloat.toString();`
Thanks man. It worked.
If I wanted to insert text such as "myFloat = 0", how would I do that?