I’ve just upgraded to 2.01, and I’ve been really excited about the new GUI in the release. Unfortunately, I’m having some trouble trying it out. I’ve put in the code based on one of the examples, and I’m getting errors on compilation:
Assets/Scripts/GUI.js(3) error BCE0019: 'Box' is not a member of 'GUI'.
Assets/Scripts/GUI.js(5) error BCE0019: 'Button' is not a member of 'GUI'.
Here is script in its entirety:
function OnGUI () {
GUI.Box (Rect(10,10,100,90), "Main Menu");
if (GUI.Button (Rect(20,40,80,20), "Button")) {
print("You clicked the button!");
}
}
I’m running 10.4.10 on a PowerBook G4 if that makes any difference. Thanks.