playMaker

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

odthiago

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Call static method[SOLVED]
« on: November 12, 2018, 07: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 13, 2018, 11:13:25 PM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14059
  • Official Playmaker Support
    • View Profile
Re: Call static method
« Reply #1 on: November 12, 2018, 10:50:25 PM »
Hi,

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

Bye,

 Jean

odthiago

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Call static method
« Reply #2 on: November 13, 2018, 04: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, 05:35:05 AM by odthiago »

odthiago

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Call static method
« Reply #3 on: November 13, 2018, 05: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