Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: hrlarsen on March 19, 2014, 11:53:52 AM

Title: UICenterOnChild bug
Post 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
Title: Re: UICenterOnChild bug
Post by: ArenMook on March 20, 2014, 01:32:14 AM
What do you mean by "resets"?

Also you are missing UICenterOnClick on your widgets.
Title: Re: UICenterOnChild bug
Post by: hrlarsen on March 20, 2014, 10:02:27 AM
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.
Title: Re: UICenterOnChild bug
Post by: ArenMook on March 20, 2014, 12:58:00 PM
What's the call stack? Resetting happens when you resize a scroll view that doesn't have a scroll bar, I know that much.