- Home /
Question by
Sommy1491 · Jun 05, 2016 at 04:14 PM ·
unity 5uievent handlers
How to get IsPointerOverGameObject(touchID) object reference
hi, i am using unity 5 UI. my question is how to get object reference of IsPointerOverGameObject(touchID).
here is my code.
private void Update(){
if (Input.touchCount > 0) {
touchCount = Input.touchCount;
mytouches = Input.touches;
foreach (Touch myTouch in mytouches) {
if (currentEvent.IsPointerOverGameObject (myTouch.fingerId)) {
// i want to access the reference of (currentEvent.IsPointerOverGameObject (myTouch.fingerId))
}
}
}
}
Comment