September 2010
Beginner
384 pages
8h 49m
English
Let's create one of these Automatic Layout areas in our GameScript.
Update function in this script either. As we did earlier, change Update to OnGUI to create an OnGUI function:function OnGUI () {
OnGUI function:function OnGUI ()
{
GUILayout.BeginArea (Rect (0,0,Screen.width,Screen.height));
GUILayout.EndArea();
}
The area will be the width and height of the screen, and it will start at the screen origin at the top-left of the screen.
These two statements are like bookends or HTML tags. Any UI controls we build between these bookends will be created within the area. Each new control will automatically stack vertically beneath ...
Read now
Unlock full access