Why is my scrollbar not working?
Asked Answered
B

5

0

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!

Bandoline answered 24/9, 2023 at 19:11 Comment(2)

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...

Carousal

Hi! here are some screenshots of my setup. the size of the scrollbar is always set to 1.[52696-scrollbar.png|52696]

Bandoline
E
0

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.

52697-hierarchy.png

52698-screen-shot-2015-08-25-at-22623-pm.png

Endways answered 6/6, 2023 at 3:21 Comment(2)

that is exactly what i have.... see screenshots: [52724-scrollrect.png|52724] [52725-scrollbar.png|52725]

Bandoline

Please try to change "movement type" in scrollRect .. and one more reminder 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.

Endways
O
0

Try setting size = 0.2 and Value = 1 for ScrollBar gameobject. Also, try changing Movement Type to Elastic Movement value.

Ope answered 25/8, 2015 at 13:11 Comment(0)
B
0

@Endways 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!

Bandoline answered 6/6, 2023 at 2:36 Comment(2)

@Bandoline : :) 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

Endways

can you share your code please?

Hammock
D
0

Ya I am having the same issue
I even have the scrollrect smaller than the parent.
I am actually following this video

all of my settings are the same as the settings in this video

It is brackey’s tower defense video.

Please help!!!

Distressful answered 12/4, 2021 at 3:29 Comment(0)
O
0

Add Content Size Fitter to the Content object and set Vertical to Preferred Size

Owens answered 24/9, 2023 at 19:11 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.