- Home /
ScrollBar on ScrollRect not scrolling to the bottom when setting value through code
As the title explains, I have a scroll rect with a scroll bar and content inside. The content has a content size fitter attached which I know is what is most likely messing this up. When I instantiate a button into the content container I'm setting the value to 0 so that it shows the button that was added. However, instead it's going to the bottom but not taking into account the button that was added so it scrolls to the bottom that would have been the bottom before the button was added. As you can see, the scroll bar doesn't go to the bottom, it goes to just before the button. The pivot on my content is set to 1 which I have checked in other Questions but that isn't fixing it.
Your answer
Follow this Question
Related Questions
Scrollbar touch sensitivity 0 Answers
Scrollbar scrolling in the opposite direction 1 Answer
Why is my scrollbar not working? 4 Answers
How to disable ScrollView dragging 4 Answers
Smooth scroll snap? 3 Answers