Greetings; I’m trying to implement a vertically-scrolling GUI area containing a list of “items,” but there are a few problems with it that I can’t seem to fix after 1-to-2 hours of tinkering. First and foremost, when I drag the scrollbar for a list of items down, the items at the top seem to “move out” of the scrollbar area. There’s also a pesky horizontal scrollbar at the bottom that I can’t interact with that shouldn’t be there, and the box seems to be drawing at 0,0, as opposed to the 10,10 that I want it to be drawn at. To illustrate the problem:
Relevant code:
void Menu()
{
GUILayout.BeginArea(new Rect(10, 10, width, height),AreaStyle);
scrollPosition = GUILayout.BeginScrollView(scrollPosition, GUILayout.Height(220));
GUILayout.BeginVertical();
GUILayout.EndVertical();
//Scrollview is populated with buttons here
GUILayout.EndScrollView();
GUILayout.EndArea();
}
The class that contains this function uses both a GUIStyle and GUISkin. Any help would be greatly appreciated.