Search Unity

click on a button with touch

Discussion in '2D' started by PersianKiller, Sep 13, 2019.

  1. PersianKiller

    PersianKiller

    Joined:
    Jul 16, 2017
    Posts:
    132
    let's say i have 3 buttons,i want to touch the screen,then if i move my finger to a button,it should detect the button and click on it,how can i do it?
     
  2. Adien22

    Adien22

    Joined:
    Aug 19, 2019
    Posts:
    44
    well, you would first need to set up a canvas, then add 3 buttons to it, and add code to the buttons for whatever you want them to do
     
    PersianKiller likes this.