Playmaker Forum

Playmaker Help & Tips => iOS Help => Topic started by: InfusedNL on November 06, 2018, 03:12:24 AM

Title: How to enable touch event for GUI button[SOLVED]
Post by: InfusedNL 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
Title: Re: How to enable touch event for GUI button
Post by: djaydino 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
Title: Re: How to enable touch event for GUI button
Post by: InfusedNL 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