Hey guys, I’m back again. This time I’m trying to figure out how to make
UILayout.BeginScrollView()
work correctly. I mean, it’s working like I believe it should be, but I can’t seem to actually get the area to scroll. Do I have to set up a scrollbar for it, or is it supposed to automatically do it when content overflows? The attached picture is the layout, and here’s the code I’m using:
GUI.skin = LoadSkin;
GUILayout.BeginArea(new Rect(225, 55, 400, 500));
GUI.Box(new Rect(5, 7, 390, 74), "", "LoadTitle");
GUI.Box(new Rect(0, 0, 400, 500), "", "LoadBorder");
int y = 0;
GUILayout.BeginArea(new Rect(11, 75, 376, 425));
saveList = GUILayout.BeginScrollView(saveList, GUILayout.Width(376), GUILayout.Height(425));
foreach(var i in text)
{
GUI.Box(new Rect(0, y, 376, 20), i, "LoadLine");
y = y + 20;
}
GUILayout.EndScrollView();
GUILayout.EndArea();
GUI.Box(new Rect(0, 0, 400, 500), "", "LoadBorder");
GUILayout.EndArea();