Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: jrDev on October 25, 2019, 11:15:01 AM

Title: UI Click Event Bug?
Post 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
Title: Re: UI Click Event Bug?
Post by: jrDev on October 25, 2019, 12:58:30 PM
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
Title: Re: UI Click Event Bug?
Post by: jrDev on October 25, 2019, 01:11:01 PM
Hello,

Another test reveals that Templates do not work with UI Click event.

Thanks,
jrDev
Title: Re: UI Click Event Bug?
Post by: jrDev on October 27, 2019, 02:17:58 PM
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
Title: Re: UI Click Event Bug?
Post by: jeanfabre on October 29, 2019, 03:07:00 AM
Hi,

just so that I understand, you have copied the fsm component using the Unity inspector right click menu right?

Bye,

 Jean
Title: Re: UI Click Event Bug?
Post by: jrDev on October 29, 2019, 10:40:50 PM
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
Title: Re: UI Click Event Bug?
Post by: jeanfabre on October 30, 2019, 02:56:40 AM
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
Title: Re: UI Click Event Bug?
Post by: jrDev on October 31, 2019, 11:05:40 AM
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
Title: Re: UI Click Event Bug?
Post by: jeanfabre on November 01, 2019, 03:21:38 AM
Hi,

 yep, PlayMaker automatically add all the internal components to catch any system events you have on a given fsm.

Bye,

 Jean