Welcome,
Guest
. Please
login
or
register
.
June 12, 2026, 10:52:57 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
How to response the OnHover in item container when dragging item!
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to response the OnHover in item container when dragging item! (Read 5153 times)
xiaoniaojjj
Full Member
Thank You
-Given: 0
-Receive: 0
Posts: 140
How to response the OnHover in item container when dragging item!
«
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?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: How to response the OnHover in item container when dragging item!
«
Reply #1 on:
September 25, 2012, 08:15:44 AM »
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.
Logged
xiaoniaojjj
Full Member
Thank You
-Given: 0
-Receive: 0
Posts: 140
Re: How to response the OnHover in item container when dragging item!
«
Reply #2 on:
January 09, 2013, 12:16:39 PM »
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;
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: How to response the OnHover in item container when dragging item!
«
Reply #3 on:
January 09, 2013, 03:25:26 PM »
I think you might have to dig deeper into the sequence of events to figure out what's happening in your case.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
How to response the OnHover in item container when dragging item!