function OnGUI () {
// Make a background box
GUI.Box (Rect (10,10,100,90), “Hello”);
}
The above works. But I want to do the following, with a real variable of course…
function OnGUI () {
var x : float;
x = 22.2;
GUI.Box (Rect (10,10,100,90), x);
}
the above fails compile.
all the code samples I see just output a string. what is the syntax if I want to output a variable?