How to get team code

Hello all, I'm trying to get the team code, which I'm going to use for spawning, I've come up with this

    public int GetTeamCode(byte code)
    {
        PhotonTeam team;
        if(PhotonTeamsManager.Instance.TryGetTeamByCode(code, out team))
        {
            return team.Code;
        }
        return 0;
    }

But I'm unsure how I can grab the current players code with this, thanks in advance for all help!

Answers

  • The local player's code?

    PhotonNetwork.LocalPlayer is extended with GetTeam()