Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: tman1978 on April 22, 2014, 12:53:40 AM
-
I'm trying to get PlayMaker working with a UISlider to fire events when the UISlider value is changed but I cannot get it to work. Here is what I have done so far:
1. Placed the NGUI Playmake Proxy prefab in my scene.
2. Attached the NGuiEventsToPlaymakerFsmEvents script to my slider.
3. Set the FSM target on NGuiEventsToPlaymakerFsmEvents to an FSM in my scene.
4. Added a NGUI / ON SLIDER CHANGE transition event to my state.
5. In the "On Value Change" of my slider I've put my NGUI PlayMaker Proxy gameObject that was created from the prefab.
After performing the steps above no events get fired when I drag my slider. Can someone help me find where I've gone wrong? Also, can someone provide a simple scene that that shows how to get this working?
I'm using NGUI 3.5.7 and PlayMaker 1.7.7.1.
Thanks.
-
I've attached a simple scene that shows the problem I'm having. Import into a project that has the latest versions of NGUI, PlayMaker, and the PlayMaker NGUI addon.
-
Hi,
I have updated the packages so that it works now. Also, you don't need to bind anything manually, simply having the NGuiEventsToPlaymakerFsmEvents on the same gameobject as the slider will do as long as you implemented the NGUI / ON SLIDER CHANGE event or your custom one for that slot.
I have created an example for this ( tutorial 10 -sliders in the playmaker ngui samples).
Bye,
Jean
-
Thanks, it works now with the updated package.
-
Hi Jean, this does not appear to be working with 3.6.0 or 3.6.1 of NGUI - possible that something has changed again?
-
OK the problem is with customising the Slider Event, using the NGUI / ON SLIDER CHANGE works but not if I use MySliderEvent.
-
Hi,
I doubled checked and it's working. Are you sure you don't have a typo? make sure you copy the event name properly between this proxy and PlayMaker.
Bye,
Jean