Search Unity

OnPointerUp vs OnMouseUp and second object

Discussion in 'UGUI & TextMesh Pro' started by aholla, May 28, 2015.

  1. aholla

    aholla

    Joined:
    May 27, 2014
    Posts:
    81
    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. Daybreaker32

    Daybreaker32

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

    aholla

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

    Daybreaker32

    Joined:
    Jun 11, 2014
    Posts:
    73
    You're welcome.
     
  5. shahiltp_aramco

    shahiltp_aramco

    Joined:
    Apr 5, 2020
    Posts:
    4
    you activate isclickable = true ; when Ondrop detected instead of onmouseup.
    because on mouse up calls first than Ondrop.