Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Right Click Behavior.

Discussion in 'UGUI & TextMesh Pro' started by hoesterey, Dec 11, 2014.

  1. hoesterey

    hoesterey

    Joined:
    Mar 19, 2010
    Posts:
    659
    Call me crazy but I'm missing something with the system.

    Is there a way to override the behavior of right click on a single button?

    E.g. Have right click click button A but do nothing to button B

    Thoughts?
     
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,181
  3. Sebioff

    Sebioff

    Joined:
    Dec 22, 2013
    Posts:
    218
    Shouldn't the Press()-method be protected to properly allow this though? Forking the entire UI system just to add another handler that triggers presses seems a bit cumbersome...
    I noticed this in other places - oftentimes it seems as if its necessary to directly change the UI code instead of being able to extend it using inheritance?
     
  4. hoesterey

    hoesterey

    Joined:
    Mar 19, 2010
    Posts:
    659
    Thanks for the reply. I do agree it would be nice to have some more of this type of basic functionality built into the code so we didn't have to fork the source. Would much rather use inheritance on a component level to avoid overhead when upgrading.