Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Splankton on January 18, 2019, 02:49:17 PM
-
Hi,
Can someone explain how I can make a simple button for touch. I have tried using the OnClick() Runtime event thing, sending a string etc, but its not firing the event.
I'm obviously doing something wrong. I just need a little help with it. I'm using Playmaker 1.9 and in the UI actions, I cant find anything that I could use to fire a touch event. Please help, I'm going mad
-
There are built-in UI Events in PlayMaker:
https://hutonggames.fogbugz.com/f/page?W128
Quick setup:
Start a new scene.
Add GameObject > UI > Button.
Add an FSM to the Button.
Add a transition with UI CLICK event.
Press play and click the button, you should see the transition trigger.
-
Ok, fixed it now. I was doing everything right, just didnt have the EventSystem GameObject added, which I only noticed by doing what you suggested in a new scene. Thanks Alex
-
I hate forgetting the EventSystem! It seems like Unity should warn about this. Maybe I'll add it to PlayMaker...