I’m having a major issue with the scroll rect. I seem able to get the scroll rect to scroll through its contents fine with the scroll wheel but when trying to use a button, it seems to keep snapping. Here’s the code so far in my Update loop.
Any help about why this is not working it would be great. Speed is a global variable which I can amend at runtime and regardless of the value it doesn’t work…
Do you have a Scrollbar attached to the ScrollRect as well? If so, the ScrollRect position is being set to the Scrollbar’s value every frame. Try setting the Scrollbar value instead of directly accessing the ScrollRect position.
No I don’t though I suppose there’s no reason I couldn’t have one. It’s still confusing me while the scroll wheel is working though so I would like a solution to it without a scrollbar as well.
Just thought I’d mention, I think scrolling is working by default and my code is probably not actually affecting it. So if anybody else has methods for getting text to scroll using button inputs I’d be interested in seeing them.