GUILayout.BeginVertical (); GUILayout.Button ("Button 1"); GUILayout.Button ("Button 2"); GUILayout.Button ("Button 3"); GUILayout.EndVertical (); GUILayout.BeginVertical (); GUILayout.Button ("Button 1"); GUILayout.Button ("Button 2"); GUILayout.Button ("Button 3", GUILayout.ExpandHeight (true)); GUILayout.EndVertical ();
GUILayout.BeginHorizontal(); GUILayout.Button("Button 1"); GUILayout.Button("Button 2"); GUILayout.Button("Button 3", GUILayout.ExpandHeight(true)); GUILayout.EndHorizontal();In this example, we have a horizontal layout with three buttons. The third button has `GUILayout.ExpandHeight(true)` added to it, which expands the height of the button to fill the remaining space in the layout. The package library for GUILayout ExpandHeight is UnityEditor.