I am using Lanzinger’s Classic Game Design text to learn and teach Unity in my class. I have copied the following code to insert text into my game but consistently get an error.
#pragma strict
function OnGUI () {
Var Result: int = 2 + 2;
GUI.Box(Rect(10,10,240,40), "Result us " + Result);
}
Any suggestions?
