playMaker

Author Topic: No overload for method..  (Read 3623 times)

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
No overload for method..
« on: July 07, 2011, 05:05:00 PM »
I am working with someone familiar with playMaker for some custom actions... He is currently offline as per different time zones..

He made a change to an action and i am now getting this error. Was wondering if anyone could explain it to me. I have done a bunch of reading and i cant quite figure out why i am getting it.. he said he was not getting an error.

So we are using:

RaycastHit hitInfo = ActionHelpers.MousePick(rayDistance.Value);

And i get error rror CS1501: No overload for method `MousePick' takes `1' arguments

I compared our code against MousePickEvent and MousePick actions and it all seems to fit.

Any ideas?

Q

giyomu

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 108
    • blog
Re: No overload for method..
« Reply #1 on: July 07, 2011, 06:25:40 PM »
well only things i would see if that, or the type you pass in is not correct or the raydistance is not a fsm variable and in this case the .Value is not necessary.

that the two that generally generate this error or when you dont pass a coorect number of argument

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: No overload for method..
« Reply #2 on: July 07, 2011, 07:18:47 PM »
Well i tried those before from my reading...

I also just put in 100 instead of a variable and get the same thing..

I also read that it can be the variable that it is trying to pass to RaycastHit hitInfo... but it matches everything i have looked at...

I am lost

Q

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: No overload for method..
« Reply #3 on: July 08, 2011, 01:04:02 AM »
ActionHelpers.MousePick takes a float pick distance and an int layermask. It returns a RaycastHit, trying to use cached values compatible with the pick distance and layermask. This allows many actions to use MousePick without each one doing it's own Raycast (which can get expensive).

Be aware that ActionHelpers aren't documented right now and are subject to change. You can use standard Unity Raycast methods instead to be safe...

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: No overload for method..
« Reply #4 on: July 08, 2011, 05:57:56 PM »
So i think it was improper variables being passed.

Q