Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: wangzy_88 on March 22, 2015, 10:19:35 PM

Title: button in scrollView click bug
Post by: wangzy_88 on March 22, 2015, 10:19:35 PM
I use scrollView like this:
GameObjectA has UIDragScrollView and boxCollider.
GameObjectB under A has UIScrollView and UIPanel.
GameObjectC under B has UIGrid.
Two buttons under C has boxCollider,UIDragScrollView and MyClickFunction.

When buttons scroll to top,can drag but can't click,when scroll below panel's middle,can drag and click.
I change one button's boxCollider center's z to -1,two button can click.

I really don't know why,is positions error?
Title: Re: button in scrollView click bug
Post by: wangzy_88 on March 23, 2015, 12:27:15 AM
I find a way to solve this problem,add UIWidget script to GameObjectA,even disable this component,click function will be called.
Title: Re: button in scrollView click bug
Post by: ArenMook on March 23, 2015, 09:56:02 AM
Your UICamera needs to be set to 2D UI, not 3D UI. All colliders inside the scroll view also need to have UIDragScrollView attached.
Title: Re: button in scrollView click bug
Post by: wangzy_88 on March 25, 2015, 01:12:21 AM
Thank you very much.EveryThing is right now.