GUILayoutMaxWidth
GUILayoutMaxWidth is a property in Unity's legacy IMGUI system that controls the maximum width a GUI element can occupy when automatically arranged using `GUILayout` functions. When using `GUILayout.BeginHorizontal()` or `GUILayout.BeginVertical()`, elements are arranged and sized based on their content and available space. By default, elements can expand to fill available space. However, `GUILayoutMaxWidth` allows developers to set an explicit upper limit on how wide a particular GUI element can become within this automatic layout.
This property is useful for preventing elements from becoming excessively wide and distorting the overall layout,