- Home /
Invisible BeginScrollView thumb
I have a GUI Area set up with a Scroll View and Buttons, but for some the reason the thumb on the Scroll View's Horizontal Scroll Bar doesn't show up. Here is my code:
float buttonTop = 690.0f;
Vector2 scrollPosition = Vector2.zero;
void OnGUI()
{
GUILayout.BeginArea(new Rect(0.0f, buttonTop, Screen.width, Screen.height - buttonTop));
scrollPosition = GUILayout.BeginScrollView(scrollPosition);
GUILayout.BeginHorizontal();
foreach (string clipName in animator.GetClipNames())
{
GUILayout.Button("Play " + clipName, GUILayout.MaxWidth(128.0f), GUILayout.Height((Screen.height - buttonTop) * 0.5f));
}
GUILayout.EndHorizontal();
GUILayout.EndScrollView();
GUILayout.EndArea();
}
It compiles and runs just fine, and the Scroll View even works, but the thumb on the Scroll Bar is invisible. Any clues?
The draggable thumb button is certainly showing for me, perhaps the thumb is going off the bottom of your display? Try setting buttonTop
to a smaller amount like 100.0f
(just for testing).
Your answer
Follow this Question
Related Questions
ScrollView - How to stop infinite scrolling? 1 Answer
ScrollWindow AutoUpdating value help :( 1 Answer
GUIlayout scrollbar, Not working well... 1 Answer
How to change thickness of ScrollBar of GUILayout ScrollView? 0 Answers
GUILayout.BeginScrollView cant seem to change where the box I create is positoned. 1 Answer