playMaker

Author Topic: UI Click Event Bug?  (Read 4162 times)

jrDev

  • Junior Playmaker
  • **
  • Posts: 59
UI Click Event Bug?
« 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
« Last Edit: October 25, 2019, 12:22:58 PM by jrDev »

jrDev

  • Junior Playmaker
  • **
  • Posts: 59
Re: UI Click Event Bug?
« Reply #1 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

jrDev

  • Junior Playmaker
  • **
  • Posts: 59
Re: UI Click Event Bug?
« Reply #2 on: October 25, 2019, 01:11:01 PM »
Hello,

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

Thanks,
jrDev

jrDev

  • Junior Playmaker
  • **
  • Posts: 59
Re: UI Click Event Bug?
« Reply #3 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
« Last Edit: October 27, 2019, 02:37:10 PM by jrDev »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: UI Click Event Bug?
« Reply #4 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

jrDev

  • Junior Playmaker
  • **
  • Posts: 59
Re: UI Click Event Bug?
« Reply #5 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
« Last Edit: October 29, 2019, 10:42:44 PM by jrDev »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: UI Click Event Bug?
« Reply #6 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

jrDev

  • Junior Playmaker
  • **
  • Posts: 59
Re: UI Click Event Bug?
« Reply #7 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: UI Click Event Bug?
« Reply #8 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