Search Unity

OnPointerUp vs OnMouseUp and second object

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by aholla, May 28, 2015.

  1. aholla

    aholla

    Joined:
    May 27, 2014
    Posts:
    33
    If I have two identical objects with "OnMouseUp" and "OnPointerUp" methods. If I press the mouse down on the first object and drag over to the second object and then release the mouse over the second object I would expect the second object's OnMouseUp and OnPointerUp to fire. Instead the OnMouseUp only fires and the OnPointerUp fires on my first object.

    Does anyone have any idea on how I can get "PointerUp" to fire on my second object as that is the one the mouse up event happens over.

    The reason for this is I am trying to move to the new Pointer Events to solve UI click though bugs. I cant swap to the new events because they fire differently :(

    Thanks,
    Adam
     
  2. daybreaker93

    daybreaker93

    Joined:
    Jun 11, 2014
    Posts:
    71
  3. aholla

    aholla

    Joined:
    May 27, 2014
    Posts:
    33
    Ah yeah, I could use the drop handler to call the method on my drop target. Thanks.
     
  4. daybreaker93

    daybreaker93

    Joined:
    Jun 11, 2014
    Posts:
    71
    You're welcome.