Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: xiaoniaojjj on September 25, 2012, 01:16:34 AM
-
I creat a class like UIItemSlot, How to response OnHover in item container when dragging item, i try to user OnHover in My class,but i doesn't work when dragging.
i can use OnMouseOver to resolved.But have any easy way to get it?
-
When you start the drag process, disable the dragged object's collider and set UICamera.selectedObject = null in addition to UICamera.currentTouch.pressed = null. This clear the reference to what's being dragged, and you will be receiving OnHover events on your items.
-
It's my code in below: But the item still can't receive the OnHover when Mouse Pressed dragging, They would be fine when the Mouse Released ,
UICamera.selectedObject = null;
UICamera.currentTouch.pressed = null;
BoxCollider bc = GetComponent<BoxCollider>();
bc.enabled = false;
bc.isTrigger = false;
-
I think you might have to dig deeper into the sequence of events to figure out what's happening in your case.