Isnt there any NGUI listener or bool member. That way we can just check that if any action on any NGUI UI item is performed.
Im facing the same problem. Im making an isometric game. When i press a button on HUD and drag(even within the bounds of that button) or any BG/button on a UI and drag the ray goes through and ISO functionalites are performed like drag or click.
Isnt there any Trigger/listener/dataMember liken when i press a button and drag the mouse/finger out the state remains pressed.
and Dragging is another case but simple click also goes through.
here is a code snippet of what im doing. If goes into this first code block but it also goes forward meaning skips this.
if(iPhoneInput.touchCount > 0)
{
iPhoneTouch touch = iPhoneInput.touches[0];
ray = gState.world.nGUICamera.ScreenPointToRay(touch.position);
if (Physics.Raycast(ray, out hit, Mathf.Infinity, LayerMask.NameToLayer("UI")) && (
touch.phase == iPhoneTouchPhase.Ended || touch.phase == iPhoneTouchPhase.Canceled
|| touch.phase == iPhoneTouchPhase.Began))
{
Debug.Log("IN CANCLE MODE");
CancelTouchMode();
return;
}
}
and down some where in update i do
if(iPhoneInput.touchCount==1 )
{
SingleTouchAction();
}
HOw to block this touch.