Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Breadman on May 13, 2017, 11:21:11 PM

Title: [SOLVED] PlayMaker controls for interactions with Unity UI?
Post by: Breadman on May 13, 2017, 11:21:11 PM
Hello!

Does anyone know a way to listen for Unity UI events with PlayMaker? For example, if the mouse is dragged off of a UI button, do X.

Previously, I'd just have the Unity UI button "set bool isActive" on a gameobject with my PlayMaker FSM on it, so the button basically activate a gameobject which operate all my PlayMaker actions as soon as it's active. But this time I'm looking for a little more control - I'd like to do different things based on how the player interacts with the UI button.

Has anyone tried this before? Thankful for any tips or ideas!
Title: Re: PlayMaker controls for interactions with Unity UI?
Post by: Breadman on May 13, 2017, 11:23:51 PM
I found the answer already, oops!

Just add an "event trigger" component to the button object, and then you have options for "mouse exit", "mouse enter" etc!
Title: Re: [SOLVED] PlayMaker controls for interactions with Unity UI?
Post by: jeanfabre on May 15, 2017, 02:38:05 AM
Hi,

 yes, this EventTrigger component is very useful, I am thinking of doing one like that dedicated to PlayMaker cause right now, it's a bit of a hack to plug PlayMaker with EventTrigger Component

 Bye,

 Jean