playMaker

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

kentcheung2000

  • Playmaker Newbie
  • *
  • Posts: 37
    • View Profile
On Click events same as Touch in mobile devices?
« on: January 25, 2019, 11:13:37 AM »
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, 11:15:17 AM by kentcheung2000 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14564
  • Official Playmaker Support
    • View Profile
Re: On Click events same as Touch in mobile devices?
« Reply #1 on: January 28, 2019, 12: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
    • View Profile
Re: On Click events same as Touch in mobile devices?
« Reply #2 on: January 30, 2019, 01: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...