- Home /
Scrollbar handle not changing position when altering Scrollbar.value
I'm trying to change the value of my scrollbar that is attached to my scrollview. The value changes successfully but the handle itself does not change position which is extremely annoying. How do I get the handle to change position or change it manually?
scrollRect.verticalScrollbar.value = 1f;
Answer by hexagonius · Dec 10, 2018 at 05:42 PM
the scrollrect itself has all the functionality you need, you're bypassing it the way you do it:
https://docs.unity3d.com/ScriptReference/UI.ScrollRect-verticalNormalizedPosition.html
Unfortunately that isn't working for me either. After some googling I've figured out that the scrollrect is buggy as hell. Look at the most recent post on this thread (Posted September 2018).
https://forum.unity.com/threads/repositioning-scrollrect-through-code-bug-or-wrong-method.270550/
If anyone has a fix to this, please let me know. I've been banging my head against the wall trying to figure this out.
Your answer
Follow this Question
Related Questions
Smooth scrollbar movement on display release 0 Answers
How to scrolling scrolling panel using Script or Keyboard 1 Answer
I am still able to scroll even though scroll type is clamped? 0 Answers
My scroll view always scrolls to the bottom automatically. 3 Answers
Scrollview not showing scroll bar and not scrolling 1 Answer