Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: hrlarsen on March 19, 2014, 11:53:52 AM
-
When having a UICenterOnChild component in a scroll view, it resets when just clicking on a drag child. It works fine when just dragging around. Here is my hierarchy:
UIScrollView
- (UIGrid + UICenterOnChild)
- - (UIWidget + Collider + UIDragScrollView)
- - (UIWidget + Collider + UIDragScrollView)
- - (UIWidget + Collider + UIDragScrollView)
....
Anything I am doing wrong? I have attached the settings of the components
-
What do you mean by "resets"?
Also you are missing UICenterOnClick on your widgets.
-
It snaps back the the first widget in the hierarchy. As if ResetPosition() was called on the ScrollView, but it's not. I noticed that UpdatePosition in the ScrollView is called everytime this "snap to the beginning" is happening.
I was able to replicate it setting up a new scene with the hierarchy described in the first post.
I just put centerOnClick on all widgets under the grid/centerOnChild component, though it did not make any difference.
-
What's the call stack? Resetting happens when you resize a scroll view that doesn't have a scroll bar, I know that much.