Search Unity

Best methods to ignore touch over a button

Discussion in 'Project Tiny' started by vincismurf, Dec 25, 2018.

  1. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    194
    I have logic that fires a projectile on every touch. . . but I would like it not to fire when over a button. I have not found the proper translation of canvas space to input space.

    Can anyone help?
     
  2. abeisgreat

    abeisgreat

    Joined:
    Nov 21, 2016
    Posts:
    45
    This is just a hack but if you put a big transparent button on your UI Canvas then your firing could be a click on that and then your other buttons would naturally percent it from triggering when stacked on top of the invisible bottom.
     
    bpetersonvalorem likes this.