playMaker

Author Topic: [SOLVED] PlayMaker controls for interactions with Unity UI?  (Read 2206 times)

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
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!
« Last Edit: May 13, 2017, 11:24:01 PM by Breadman »

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: PlayMaker controls for interactions with Unity UI?
« Reply #1 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!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: [SOLVED] PlayMaker controls for interactions with Unity UI?
« Reply #2 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