playMaker

Author Topic: On Click events same as Touch in mobile devices?  (Read 2856 times)

kentcheung2000

  • Playmaker Newbie
  • *
  • Posts: 37
On Click events same as Touch in mobile devices?
« on: January 25, 2019, 01:13:37 PM »
Hi,

I am using on click events to activate a button.  If it is on mobile devices, is it the same as touch?

If it is not the same, what action I can use to simulate a touch events?
« Last Edit: January 25, 2019, 01:15:17 PM by kentcheung2000 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: On Click events same as Touch in mobile devices?
« Reply #1 on: January 28, 2019, 02:31:39 AM »
Hi,

 no, the UI system uses a concept called Pointer, which includes touches but not only,

If you want to simulate touch events, you need to use Unity Remote with your device: https://docs.unity3d.com/Manual/UnityRemote5.html

Bye,

 Jean

christougher

  • Playmaker Newbie
  • *
  • Posts: 36
Re: On Click events same as Touch in mobile devices?
« Reply #2 on: January 30, 2019, 03:15:18 AM »
Unity UGUI buttons will detect both clicks and touches without any fuss, the onClick playmaker event will work just fine, is the gui button itself that sends that event not the mouse itself...