Hi,
I have a scroll view and I want to add a button for each variable stored in a List<>, but apparently it makes it not scrollable.
int top = 5; bool isFirst = true;
GUI.BeginScrollView(....);
foreach (Item item in ListOfItems)
{
if (GUI.Button(new Rect(5, top, ....)))
DoSomething();
// Just to create proper spacing between buttons
if (isFirst)
top += 32;
else
top += 37;
isFirst = false;
}
GUI.EndScrollView();
How can I fix it ?