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

Get button transform / disable other functions when click on button

Discussion in 'UGUI & TextMesh Pro' started by Adrianoooz, Jan 19, 2021.

  1. Adrianoooz

    Adrianoooz

    Joined:
    Jan 15, 2019
    Posts:
    12
    Hello,
    I'm working on augmented reality game (mobile development). I have created a simple button in the scene, which after being clicked, changes scene to main menu. But if I'm tapping the button with my finger, it is also calling other functions responsible for tapping.
    How can I get the exact button transform, so I can exclude this part of screen from calling other functions? Or is there any easy way to just tell Unity Engine: "HEY, IF YOU TAP ON THIS BUTTON, JUST GO TO OTHER SCENE, DON'T CALL OTHER FUNCTIONS"?
     
  2. Adrianoooz

    Adrianoooz

    Joined:
    Jan 15, 2019
    Posts:
    12