Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: grimmy on January 30, 2021, 02:57:10 PM

Title: UI Button On Click - Argument Exception [SOLVED]
Post by: grimmy 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
Title: Re: UI Button On Click - Argument Exception
Post by: Alex Chouls 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
Title: Re: UI Button On Click - Argument Exception
Post by: grimmy 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)
Title: Re: UI Button On Click - Argument Exception
Post by: Alex Chouls 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!
Title: Re: UI Button On Click - Argument Exception
Post by: grimmy 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