- Home /
Unity 5 UI Scroll Rect Problem
I'm going to try and explain the best I can what I am doing and the problem that is occurring.
I created a "scroll area" with the Scroll Rect component in Unity 5 UI. The object (its child) in its "content" that it is scrolling is a parent gameobject that has a bunch of children that are image gameobjects (that are dynamically created). I effectively scale the width of the parent gameobject (the one that holds the image gameobjects) to fit however many children it has, so that when you scroll the parent you can see all the children objects. I have the parent's anchors set to The problem is sometimes the parent seems to (0, 0.5) so that the width only extends to the right. The problem that occurs is that sometimes (when doing it over and over during runtime) all of the sudden the width seems to extend to the left instead of the right. The only problem I can think of is that the anchor changes or something, it seems to extend the right amount just in the opposite direction. I know its a hard scenario to figure the answer out, but I figured I'd try. Maybe someone has a different method for a "scroll area"?
Your answer
Follow this Question
Related Questions
Scroll Rect Min/Max Size 0 Answers
How do I dynamically update a rect scroll from a List? 0 Answers
ScrollRect makes object behind it move 1 Answer
Where can I edit UI.ScrollView? 0 Answers
ScrollRect scrollbar drag being overridden and stuttering to top 0 Answers