Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: jrDev on October 25, 2019, 11:15:01 AM
-
Hello,
After I copied the component values of one button's FSM component to another button's FSM component, it doesn't seem to work. Why is this?
Thanks,
jrDev
-
It seems that I had to create a new FSM and add the UI Click event to get it work. Don't know why copying values over doesn't just work. I will do some more testing to confirm.
Thanks,
jrDev
-
Hello,
Another test reveals that Templates do not work with UI Click event.
Thanks,
jrDev
-
Hello again,
I think I have narrowed down the issue. It seems that I had to reset the PlaymakerUIClickEvent.cs component on each button and reassign them back to their respective "Target FSMs" and "Button" objects to get them to work.
Hopefully @jeanfabre can chime in to see if this can be replicated? Or maybe just a weird one off bug?
Thanks,
jrDev
-
Hi,
just so that I understand, you have copied the fsm component using the Unity inspector right click menu right?
Bye,
Jean
-
Hi,
just so that I understand, you have copied the fsm component using the Unity inspector right click menu right?
Bye,
Jean
Hello,
Yes I copied using the Unity component copier from inspector.
On another note, when does the PlaymakerUIClickEvent.cs script get added to button object. Does playmaker do this itself cause I can't remember if I manually added this. Also no tutorials mention this script.
Thanks,
jrDev
-
Hi,
PlaymakerUIClickEvent is added under the hood to catch the unity events and dispatch them inside the Fsm so that you can get the system events to work.
it's odd though, cause I can't reproduce this...
are you working on a prefab?
what version of Unity and playmaker are you on?
Bye,
Jean
-
Hi,
PlaymakerUIClickEvent is added under the hood to catch the unity events and dispatch them inside the Fsm so that you can get the system events to work.
it's odd though, cause I can't reproduce this...
are you working on a prefab?
what version of Unity and playmaker are you on?
Bye,
Jean
Hello,
I am using Prefabs and I just updated to new versions of Unity and Playmaker so I need to retest to see if this is still an issue.
Also, what you are saying is that the UIClickEvent script should automatically be added to gameobject that I add the UI Click event to?
Thanks,
jrDev
-
Hi,
yep, PlayMaker automatically add all the internal components to catch any system events you have on a given fsm.
Bye,
Jean