I use the Event Trigger component, it's very fast and does wonders...
This component allows for much more control than being limited to just onClick.
https://docs.unity3d.com/Manual/script-EventTrigger.htmlThis component allows to to many things rather intuitively, like creating an event that will change a colour, a text or start a monobehaviour script.
However, beware!
As of Unity 2017, you cannot reorder the events in the list though; i.e. you can't move an event up or down the list.
This limitation is not important when doing things that don't require PlayMaker, but anything directly done through Unity's "native" functions will take precedence over PlayMaker.
So if you have a game object that you want to deactivate through an event such as GameObject.SetActive (false) and if you're also using another event such as PlayMakerFSM.SendEvent to send and event to that same game object (whatever the reason), the FSM won't have time to do anything.
FSMs seem to have something like a frame of lag when using proxies or the
Event Trigger component.
Putting the event that "talks" to the FSM at the top of the
Event Trigger's list of events circumvented that problem.
Because the event at the top of the list is going to be sent first.
Another solution is to add a
second Event Trigger component that sends events to your FSM on the same game object.
Notice that the order of your components on the game object will matter too. So place the
Trigger Event that sends events to a FSM
above any other
Trigger Event (you can drag and slide components, even if the Unity interface isn't giving you any visual clue that there's something going on).