playMaker

Author Topic: UI Button On Click - Argument Exception [SOLVED]  (Read 1417 times)

grimmy

  • Junior Playmaker
  • **
  • Posts: 70
UI Button On Click - Argument Exception [SOLVED]
« on: January 30, 2021, 02:57:10 PM »
'ArgumentException: method arguments are incompatible'

I'm getting this error when I click my button (with a Button component) in game.

It doesn't seem to matter what transition I use(FINISHED, UI CLICK etc), I always get the error.

This is my first mess around with Playmaker for a very long time..

Any ideas?
Cheers
« Last Edit: January 30, 2021, 06:10:53 PM by Alex Chouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: UI Button On Click - Argument Exception
« Reply #1 on: January 30, 2021, 04:42:05 PM »
What version of Unity and Playmaker are you using?

It's best not to mix system and user events. UI CLICK will be sent by Unity/PlayMaker if the FSM is on a GameObject with a button component. No need to use an action.

If you use an action it's best to make a new custom event (e.g., Clicked or something specific to the situation e.g., Close Menu)

You can read more about events here: https://hutonggames.fogbugz.com/f/page?W128

grimmy

  • Junior Playmaker
  • **
  • Posts: 70
Re: UI Button On Click - Argument Exception
« Reply #2 on: January 30, 2021, 04:55:43 PM »
I tried with my own custom event and got the same error.
Im using Unity 2020.2.1f1 with Playmaker 1.9.0 (That's according to the welcome screen but my package manager says its 1.9.1)
« Last Edit: January 30, 2021, 05:00:03 PM by grimmy »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: UI Button On Click - Argument Exception
« Reply #3 on: January 30, 2021, 05:13:32 PM »
Did you install after importing?
PlayMaker > Help > About PlayMaker should say 1.9.1.p2

If you still get the error in 1.9.1.p2 please copy/paste the full error from the console. Thanks!

grimmy

  • Junior Playmaker
  • **
  • Posts: 70
Re: UI Button On Click - Argument Exception
« Reply #4 on: January 30, 2021, 06:08:36 PM »
For some reason Package manager wasn't downloading over my old package. Anyway..

I can confirm this all works flawlessly in 1.9.1.p2

Cheers