playMaker

Author Topic: Call static method[SOLVED]  (Read 2254 times)

odthiago

  • Playmaker Newbie
  • *
  • Posts: 7
Call static method[SOLVED]
« on: November 12, 2018, 09:45:38 PM »
Hi, people

Im trying to call a static method (Call Static Method - Action) but rise this error:
"Invalid Method Name or Parameters:"

I bought the "Exploder" Asset and the script of the demo scene call the static method GetInstance().

Code: [Select]
public class ExploderSingleton : MonoBehaviour
...
...
private static ExploderObject Instance;

public static ExploderObject GetInstance(){
   return Instance;
}

void Awake(){
            Instance = gameObject.GetComponent<ExploderObject>();
}

What can I do?
Hope you understand...

Thx a lot,
Thiago from Brazil


« Last Edit: November 14, 2018, 01:13:25 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Call static method
« Reply #1 on: November 13, 2018, 12:50:25 AM »
Hi,

 can you make a screenshot of your action, are you setting the storeResult properly?

Bye,

 Jean

odthiago

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Call static method
« Reply #2 on: November 13, 2018, 06:22:17 AM »
Hi, Jean

Thx your support!! Sorry my coupled FSM, Im decoupling it slowly!

What am I doing wrong?

Thx a lot!
Thiago
« Last Edit: November 13, 2018, 07:35:05 AM by odthiago »

odthiago

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Call static method
« Reply #3 on: November 13, 2018, 07:47:11 PM »
Hi, Guys

My bad! The script ExploderSingleton wasn´t attached to the prefab.
Its working! Now the body parts of BOT is blowing up.

Sorry my inattention!

Thx a lot,
Thiago from Brazil