Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: erniesbot on May 15, 2015, 09:40:13 AM

Title: Does a uGui "on selected/on highlighted" type event action exist?[SOLVED]
Post by: erniesbot on May 15, 2015, 09:40:13 AM
Hi guys,

Apologies if i've overlooked something very basic here but I have the following issue.

I'm creating a UI system that needs to be navigated via a gamepad. I can navigate between the buttons fine, but I can not find an action which is triggered when a button is highlighted (not pressed).

There is a similar function for mouse use "UGUI / ON POINTER ENTER" but this does not work when the button is selected via a gamepad (or keyboard arrow keys).

To summarise, what I want to happen is: When ButtonX "is selected" --> Do somthing

Is this possible or am I overlooking something simple here?  :o

Cheers!

Title: Re: Does a uGui "on selected/on highlighted" type event action exist?
Post by: jeanfabre on May 15, 2015, 02:14:22 PM
Hi,

 interesting question. I don't know, I have never tested this. Let me run some tests and research on this. Please bump me mid next week if you haven't heard back.

 Bye,

 Jean
Title: Re: Does a uGui "on selected/on highlighted" type event action exist?
Post by: mdotstrange on May 15, 2015, 04:38:08 PM
I was trying to do this to get an inventory system working so when you selected an item in the inventory it would display an image + string and I couldn't get it working- would be great to have an "on Selection" action or something similar-
Title: Re: Does a uGui "on selected/on highlighted" type event action exist?
Post by: erniesbot on May 18, 2015, 04:08:34 AM
Hey guys!

Think I found a solution to this...

First I set up my button, with a playmaker fsm and a global event called "select" and whatever actions you want in it.

Then on my GUI button I go Add Component -> Event -> "Event Trigger". Then click "add new event type" choose "select"

Then click the "+", then I drag the button from the hirachy into where it says "None (Object)". Then click "no funtion" choose SendEvent (string) - then simply type the name of your event you want triggered in my case "select".

Boom! 8)

Title: Re: Does a uGui "on selected/on highlighted" type event action exist?
Post by: Lane on May 18, 2015, 07:39:48 AM
^ Thats how you can do it.

The UI event system is pretty robust, you really should look into all of the features that the UI system offers and take advantage of them.

One problem I found was that you can't target which FSM it sends the event to, so just make sure you have one FSM and it won't get confused. I think if you have more than one then it just sends it to the first FSM script in the inspector stack.
Title: Re: Does a uGui "on selected/on highlighted" type event action exist?
Post by: mdotstrange on May 18, 2015, 05:43:03 PM
Hey guys!

Think I found a solution to this...

First I set up my button, with a playmaker fsm and a global event called "select" and whatever actions you want in it.

Then on my GUI button I go Add Component -> Event -> "Event Trigger". Then click "add new event type" choose "select"

Then click the "+", then I drag the button from the hirachy into where it says "None (Object)". Then click "no funtion" choose SendEvent (string) - then simply type the name of your event you want triggered in my case "select".

Boom! 8)

Awesome! Thank you  :)
Title: Re: Does a uGui "on selected/on highlighted" type event action exist?
Post by: Tachyonix on August 20, 2015, 07:42:03 AM
You can also use PlayMakerUGuiPointerEventsProxy script.
Title: Re: Does a uGui "on selected/on highlighted" type event action exist?
Post by: Gua on April 27, 2017, 12:40:34 PM
Hey guys!

Think I found a solution to this...

First I set up my button, with a playmaker fsm and a global event called "select" and whatever actions you want in it.

Then on my GUI button I go Add Component -> Event -> "Event Trigger". Then click "add new event type" choose "select"

Then click the "+", then I drag the button from the hirachy into where it says "None (Object)". Then click "no funtion" choose SendEvent (string) - then simply type the name of your event you want triggered in my case "select".

Boom! 8)

For some reason it doesn't work for me :(


PlayMakerUGuiPointerEventsProxy however worked.
Title: Re: Does a uGui "on selected/on highlighted" type event action exist?
Post by: serkanos on August 16, 2017, 02:01:23 AM
I did it.
create a global event like "Sound"
add event trigger to the button
drag to button to event trigger
and select playmakerFSM.sendremoteFsmevent
Title: Re: Does a uGui "on selected/on highlighted" type event action exist?
Post by: jeanfabre on August 16, 2017, 02:36:12 AM
Hi,

 Yes, that's one way, also, ugui now feature new actions to listen to all possible Unity UI events, like uGuiOnSelectEvent action

Bye,

 Jean
Title: Re: Does a uGui "on selected/on highlighted" type event action exist?
Post by: craigz on August 24, 2017, 12:51:58 AM
Hi Jean! :D

Just wanted to ask where to to access those actions?

Thanks for following up on this!

-craigz
Title: Re: Does a uGui "on selected/on highlighted" type event action exist?
Post by: jeanfabre on August 24, 2017, 02:37:29 AM
Hi,

 they are all accessible via the Ecosystem (https://hutonggames.fogbugz.com/f/page?W1181) which sources itself from various public github reps like this one: https://github.com/jeanfabre/PlayMaker--Unity--UI

 the easiest way is to get the Ecosystem browser and you can access many custom actions, samples and packages like the uGui Package.

 Get the Full package for ugui and it will contains all the related custom actions to work with ugui.

follow me on twitter to get instant updates :)

https://twitter.com/JeanAtPlayMaker/status/871638950997372928


Bye,

 Jean

Title: Re: Does a uGui "on selected/on highlighted" type event action exist?
Post by: craigz on August 29, 2017, 12:53:01 AM
Hey Jean!

Sorry should clarify, was looking specifically for the "uGuiOnSelectEvent" action! I forgot to update to the latest :D

Thanks again! :D

-craigz
Title: Re: Does a uGui "on selected/on highlighted" type event action exist?
Post by: Gua on September 08, 2017, 07:33:15 AM
Hi,

 they are all accessible via the Ecosystem (https://hutonggames.fogbugz.com/f/page?W1181) which sources itself from various public github reps like this one: https://github.com/jeanfabre/PlayMaker--Unity--UI

 the easiest way is to get the Ecosystem browser and you can access many custom actions, samples and packages like the uGui Package.

 Get the Full package for ugui and it will contains all the related custom actions to work with ugui.

follow me on twitter to get instant updates :)

https://twitter.com/JeanAtPlayMaker/status/871638950997372928


Bye,

 Jean
I have problems with new actions, what is minimum Playmaker version requirement?


You can also use PlayMakerUGuiPointerEventsProxy script.
If you don't support navigation with gamepad or keyboard, then you can. But if you do, PlayMakerUGuiPointerEventsProxy will not help.
Title: Re: Does a uGui "on selected/on highlighted" type event action exist?[SOLVED]
Post by: jeanfabre on September 11, 2017, 02:20:25 AM
Hi,

 1.8.1 is the minimum I think,

- what version of PlayMaker do you have
- what version of uGui do you have ( in the changeling.md inside the ugui folder)
- what version of Unity?
- what problem exactly do you have?


Thanks,

 Jean
Title: Re: Does a uGui "on selected/on highlighted" type event action exist?[SOLVED]
Post by: miguelfanclub on January 26, 2019, 11:00:48 AM
Bumping this to say that the Trigger Event worked, but the action "uGuiOnSelectEvent" didnt for me.
Title: Re: Does a uGui "on selected/on highlighted" type event action exist?[SOLVED]
Post by: jeanfabre on January 28, 2019, 12:48:32 AM
Hi,

 Can you try with UiOnSelectEvent, PlayMaker has now UI support built in.

Bye,

 Jean