- Home /
Why is my scrollbar not working?
Hi! i am building a GUI System with a list of elements. To scroll this list i need a scrollbar. Therefore i have a got a ScrollRect. The elements are being placed at runtime inside of an RectTransform, which is a child of the ScrollRect Element. When I create a scrollbar and assign it to the ScrollRect Element, it does not work at all. the scrollbar has always the size of 1....
i can scroll with the mouse wheel, but not with the scrollbar. In all Videos and Tutorials on the web it works from scratch by assigning the scrollbar to the scrollrect. What am I doing wron here?
thanks for the help!
Is your scrollrect setup for a vetical scroll? if so, the scrollbar should also have his direction from bottom to top.
You could provide screenshot of your components values, it is quite hard to guess what could be wrong...
Hi! here are some screenshots of my setup. the size of the scrollbar is always set to 1.
Answer by itsharshdeep · Aug 25, 2015 at 09:00 AM
Please cross check the elements which you have placed in your scroll list . With my given screenshot
Please make sure that you add a child of scroll rect & place it into the content of the scroll rect & then make all list of element as child of the content's.
Please try to change "movement type" in scrollRect ..
and one more re$$anonymous$$der that you must have the parent bigger size ( height) than the scroll rect size.. only then your scrollrect's content will move inside the scrollRect.
Answer by LUPShow · Aug 26, 2015 at 08:26 AM
@itsharshdeep thank you so much!! it was the size issue. it was a good hint. had to make the parent bigger and add a content size filter to the content. otherwise it did not change the size and i could not scroll.
thanks a lot guys!
@LUPShow :
:) Its really my pleasure to help you to sought out the problem. It will be really great if you can accept my answer, It can improve my reputation and help me to help others :-D
Answer by NeverHopeless · Aug 25, 2015 at 01:11 PM
Try setting size = 0.2
and Value = 1
for ScrollBar
gameobject. Also, try changing Movement Type to Elastic Movement
value.
Answer by mcpedab · Apr 12, 2021 at 03:29 AM
Ya I am having the same issue I even have the scrollrect smaller than the parent. I am actually following this video https://www.youtube.com/watch?v=-cTgL9jhpUQ all of my settings are the same as the settings in this video
It is brackey's tower defense video.
Please help!!!
Your answer
Follow this Question
Related Questions
How to disable ScrollView dragging 4 Answers
Scroll Rect Min/Max Size 0 Answers
Where can I edit UI.ScrollView? 0 Answers
ScrollRect scrollbar drag being overridden and stuttering to top 0 Answers
Scrollable zooming list 0 Answers