Search Unity

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,637
    @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