예제 #1
0
 public void OnPointerUp(PointerEventData ped)
 {
     if (dragging == null || dragging.Equals(null))
     {
         Debug.Log("How did this get hit?(In DragBehaviour)");
     }
     else if (DragCatcher.hovering != null)
     {
         if (DragCatcher.hovering.onDragTo != null)
         {
             Debug.Log("Hit");
             DragCatcher.hovering.onDragTo(dragging);
         }
         dragging.image.raycastTarget = true;
         dragging = null;
     }
     else
     {
         if (dragging.onRelease != null)
         {
             dragging.onRelease();
         }
         dragging.image.raycastTarget = true;
         dragging = null;
     }
 }