"Failed to 'network-remove' GameObject because it's null." Anyone know why I'm getting this error?

Options

For some reason I'm getting this error when "Die()" gets executed.

Anyone know why?

Comments

  • Tobias
    Options

    Likely, you destroyed the controller earlier? Really hard to say without the project.

    Debug as usual: Trace when and how this gets null.

  • Alejandrazo
    Options

    Hey guy, you can try that:

    ______________________________________________________

    private bool dead=false;

    public void Die()

    {

    if(dead==false)

    {

    PhotonNetwork.Destroy(controller);

    Debug.Log("Destroyed");

    CreateController();

    dead=true;

    }

    }

    _______________________________________________________