playMaker

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

InfusedNL

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
How to enable touch event for GUI button[SOLVED]
« on: November 06, 2018, 03: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 (https://youtu.be/iSTr5ehQlBk?t=752) 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 15, 2018, 10:57:16 PM by jeanfabre »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3664
    • View Profile
    • jinxtergames
Re: How to enable touch event for GUI button
« Reply #1 on: November 06, 2018, 06: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
    • View Profile
Re: How to enable touch event for GUI button
« Reply #2 on: November 06, 2018, 09: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