Hi,
I am a new user. I was trying the GUILayout concept but it wasnt working. My Code is as below:
var signin:boolean= false;
var signup:boolean= false;
function OnGUI ()
{
GUILayout.BeginArea (Rect (50,50,100,100));
signin = GUILayout.Button ("Signin");//returns true when clicked
signup = GUILayout.Button ("Signup");
GUILayout.EndArea ();
if(signup)
DoSignUp();
}
function DoSignUp()
{
print("inside");
GUILayout.BeginArea (Rect (50,50,100,100));
GUILayout.Label ("Form");
GUILayout.EndArea();
}
The buttons Signin and Signup are seen initially. After I click the signup button, it should call the other function. It is going inside the DoSignUp() function and printing the line “inside”. But the label “Form” is not printed. Can anyone tell me why?