Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Touch instead of OnClick? UI Button Inspector

Discussion in 'Editor & General Support' started by adri1992, Mar 29, 2016.

  1. adri1992

    adri1992

    Joined:
    Dec 14, 2015
    Posts:
    34
    Hi!

    I've a button on my scene with a function added through OnClik method on the inspector, but, if I use the Touch (I'm using TouchScript library) function, the button doesn't work...

    I've added to the Event System the Touch Input Module, but it is not working yet...

    Any idea?

    Thanks!
     
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,018
    @adri1992 - Hi, show the code if you need help with it... otherwise it's just guessing. But other than that, mouse click converts to touch automatically, so unless you need more than one touch, you don't need to change anything. And I think in latest unity versions you don't need to use touch input module: http://docs.unity3d.com/Manual/script-TouchInputModule.html
     
unityunity