playMaker

Author Topic: How to enable touch event for GUI button[SOLVED]  (Read 3747 times)

InfusedNL

  • Playmaker Newbie
  • *
  • Posts: 3
How to enable touch event for GUI button[SOLVED]
« on: November 06, 2018, 05:12:24 AM »
Hi there,

At the moment I am building an AR app for iOS using ARfoundation, as I want to export it to Android later on, and I have a world space UI with two buttons which I want to use to show or hide an object.

However, which Playmaker action can I use on these buttons to detect a button press/touch? In this tutorial ( the instructor uses 'Touch GUI Event'. But when I look it up in my Unity project it says it is a legacy action and will be removed in future releases.

So my question is which function do I have to use instead of the legacy one to detect touches?

Best regards,

Christiaan
« Last Edit: November 16, 2018, 12:57:16 AM by jeanfabre »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: How to enable touch event for GUI button
« Reply #1 on: November 06, 2018, 08:48:02 AM »
Hi.
yeah that is pretty outdated.

if you have the buttons with the new ui (inside the canvas)
You can use the UI Button On Click Event

InfusedNL

  • Playmaker Newbie
  • *
  • Posts: 3
Re: How to enable touch event for GUI button
« Reply #2 on: November 06, 2018, 11:06:37 AM »
Hi Djaydino,

Thanks for the quick response! I have been stuck on this for days trying to figure out what to use, you made my day! :)

Best regards,

Christiaan