I am trying to call some code from my PlayerManager script into my PlayerController script. This is the code in the PlayerManger script:
public void Died()
{
PhotonNetwork.Destroy(controller);
CreateController();
}
And this is the code in my Playercontroller script:
void Die()
{
PlayerManager.Died();
}
When I try to run my code, I get the error: "An object reference is required for the non-static field, method, or property 'PlayerManager.Died()'" Can someone tell me what is wrong with my code, or what I have to do to fix it.