Hi,
I’m trying to do something really simple but failing miserably ![]()
Basically, I’m simply trying to put a variable in a GuiText.Text and then have it update on screen. But, the variable I plug in the GuiText doesn’t update. I know it’s working as it works in the debug.log (counts to 99). I’ve spent about an hour looking for solutions but with no success, hopefully someone can solve my problem?
static var framecount : int;
function Update () {
for (var framecount=0; framecount<=99; framecount++){
Debug.Log("framecount is "+framecount);
guiText.text = "Framecount is : "+framecount;
}
}
The result of this is the GUIText displaying ‘99’ and not updating. Almost as if I’d assigned the variable directly to GuiText.Text. Weird.
I’m guessing that updating the GuiText.text is going to take a bit more work? But I can’t understand why this works:
http://www.unity3dstudent.com/2010/07/beginner-b14-gui-text-and-counters/
As this also plugs a variable into the GuiText.Text and works fine.
Flumoxed ![]()
Thanks for any help.