I would like to loop through a collection of strings, and output an EditorGUI.TextField for each one.
However, I would like them to start wrapping onto a new line, once they reach the edge of their containing Rect.
Is there a more elegant solution to this, maybe through using GUIStyles and/or layout groups? Or will I have to control for this behavior manually.
I wound up using a ‘SelectionGrid’
public class CM_ActiveSelectionChildren : DisplayUI
{
public SelectionChildrenNames SelectionChildrenNames; //This encapsulates an array of strings
int newSelectionInt;
public override void Display()
{
GUILayout.BeginArea(UIRect); //UIRect comes from the base class
newSelectionInt = GUILayout.SelectionGrid(newSelectionInt,
SelectionChildrenNames.names, 5);
GUILayout.EndArea();
}
}