I just converted a GUILayout area to be scrollable, and suddenly it doesnt respect the area it is placed in. In the code below, if I comment out the beginScrollview line and the endscrollview line, the list of buttons displays in a bar down the right side of the screen. if I run it as is, they display in a bar down the left side of the screen, and I am unable to change the size or position of the bar by adjusting the XYWH variables (well I can change the buildingMenuH variable and it makes the area shorter as expected, but the others do nothing). This example is almost identical to the one in the docs so I dont know what is going on.
buildingMenuX = Screen.width*0.9;
buildingMenuY = Screen.height*0.1;
buildingMenuW = Screen.width*0.1;
buildingMenuH = Screen.height*0.8;
GUILayout.BeginArea(Rect(buildingMenuX,buildingMenuY,buildingMenuW,buildingMenuH));
buildMenuScrollPosition = GUILayout.BeginScrollView(buildMenuScrollPosition);
GUILayout.BeginVertical();
for(i=0;i<buildings.length;i++)
{
//some buttons
}
GUILayout.EndVertical();
GUI.EndScrollView();
GUILayout.EndArea();