Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Mayhem on November 16, 2013, 11:33:18 AM

Title: Call Method - Method Name is invalid?[SOLVED]
Post by: Mayhem on November 16, 2013, 11:33:18 AM
So I tested the Call Method - Action, which is great btw. But it gave me an error:
"Method name is invalid: PauseTime"

(PauseTime Method is a method of a third party asset)

I looked up the Behaviourscript I tried to call and copypasted the name of the function. Still an error. When I use the Invoke Method Action it works.
Then I looked up the PauseTime-Method again and saw that it's an "internal void" function and not "public void". Just out of curiousity I changed that, voilá, it worked.

So~~~~
Is it possible to allow "Call Method" to use internal methods, too :D ?
Title: Re: Call Method - Method Name is invalid?
Post by: jeanfabre on November 18, 2013, 02:04:02 AM
Hi,

 Only Public methods and properties are accessible to the outside environment for scripts, it's not just a constraint within this Action, it's by design.

If that function is private, I would look maybe for an alternative that is public. Have you contacted the authrop about this? maybe he has the same method exposed publicly somewhere else?

 Bye,

 Jean
Title: Re: Call Method - Method Name is invalid?
Post by: Mayhem on November 18, 2013, 03:45:23 AM
No, I didn't contact him, but it's not about that single action. I asked if it was possible in generel, but if that's not the case it's not a big problem at all. Invoke Method does the job ;)

Still, thanks!