- Home /
My scroll view always scrolls to the bottom automatically.
I have a panel which appears on button click - this works fine. Inside the panel, I have a scroll rect and scroll bar - this also works fine! However, when I click the button to open the panel, the scroll bar automatically scrolls to the bottom of the text! This is a really frustrating error which I really cannot figure out how to fix, could someone please help me?
Stupid question: What is the "Value" slider set to in your scrollbar?
Its set to 1 but as soon as gameplay begins it changes to 0 but I don't know why?
I just tried it out and got the same result as you. Then I changed the pivot of the scrollable content according to this answer and it worked.
HOWEVER afterwards I reset the pivot but it still worked fine..
Ins$$anonymous$$d I would suggest that you call a coroutine after instantiating your scrollview, yield one frame and then set the value to 1 to be on the safe side.
Answer by CNothing · Apr 24, 2020 at 09:04 AM
You may have scaled this GameObject, just like some scale animations. Just disable scrollRect, when it was scaled, and recover it after scale. It works for me.
Answer by Armegalo · Mar 30, 2019 at 01:12 PM
Does the RectTransform on your content or viewport have the Y pivot at 1? Fiddle with those and see if that makes a difference
Answer by Baktillus · Mar 21, 2018 at 05:11 PM
Try this; if it doesn't work make your instanting method a coroutine, yield one frame after instantiating and then set the scrollbars' value to 1.
It felt inconsistent while testing for me too though, so you might wanna submit a bug report if you don't find any duplicates :)