Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: honohanf on May 13, 2014, 12:47:18 PM

Title: Stop touches propogating OnClick()
Post by: honohanf on May 13, 2014, 12:47:18 PM
I'm using Prime31's Touchkit for swipe & screen area tap recognition, and I've then got a few NGUI buttons overlayed.

Obviously I've got the Touchkit script running after UICamera in the script execution order, but touches still propogate down even if they spark OnClicks from the buttons.

Is there a quick way of stopping these touches getting past NGUI, or do I need to couple the classes (ugly) with some lock booleans etc?
Title: Re: Stop touches propogating OnClick()
Post by: ArenMook on May 14, 2014, 05:39:57 AM
There is no way to "cancel" Input events in Unity. All scripts get them. This is why NGUI has its own event system running on top of the input events. All I can suggest is modify the prime's plugin to use NGUI's events instead of Input events, or check with Mike to see if he knows of anyone who has done it at any point.