I am trying to set up a simple GUILayout.Window with a constrained height using GUILayou.MaxHeight, in Unity iPhone. The window is not behaving well…
Here is the code… Any ideas?
/////////////////////////////////////////
var windowRect = Rect(20,20,120,50);
function OnGUI () {
windowRect = GUILayout.Window(0, windowRect, DoMyWindow, "My Window", GUILayout.MaxHeight(50));
}
function DoMyWindow (windowID : int) {
if (GUILayout.Button ("Hi there big boy"))
Debug.Log ("I hit the button");
if (GUILayout.Button ("Hi there big boy"))
Debug.Log ("I hit the button");
if (GUILayout.Button ("Hi there big boy"))
Debug.Log ("I hit the button");
if (GUILayout.Button ("Hi there big boy"))
Debug.Log ("I hit the button");
if (GUILayout.Button ("Hi there big boy"))
Debug.Log ("I hit the button");
if (GUILayout.Button ("Hi there big boy"))
Debug.Log ("I hit the button");
}