Playmaker Forum
PlayMaker News => General Discussion => Topic started by: WelchComp on October 11, 2014, 08:33:45 PM
-
I have a playmaker GUIbutton in my Unity scene and I want it to send an event the moment I click on it instead of when the GUIbutton is released. I need this because users could (and likely will) drag the mouse off of the GUIbutton before releasing their mouse button. When doing this action the event is never sent.
Is there any way I can accomplish this?
-
Are you using legacy gui or ugui?
-
Im not sure how to tell. I'm using Playmakers UI action scripts and the one I selected is called "GUI button". and it's stored under a category called "GUI"
-
Legacy GUI.
So as far as I know there is a way to do this in Unity, but there isnt an action for it. With Legacy GUI they use two separate button types to handle this situation, they're Button and RepeatButton.
Button returns a bool true when the click is released. RepeatButton returns true every frame that it is depressed. There is only an action for Button right now for Legacy.
On the other hand in 4.6 I'm pretty certain that I recall seeing this functionality built into the button system for the new uGui. Someone please correct me here if I'm wrong.