Spawn player 2

Options
I'm trying to figure out how to check whether player 1 exists already or not, I'm assuming you have to either do this with Player ID or add it to a buffer of some kind. Any help would be appreciated.
void OnJoinedRoom()

    {

         GameObject play1 = PhotonNetwork.Instantiate(player1, spawnPos, Quaternion.identity, 0);

 

         //GameObject play2 = PhotonNetwork.Instantiate(player2, spawnPos2, Quaternion.identity, 0);

 

    }

Comments

  • vadim
    Options
    Use PhotonNetwork.playerList property to get list of existing players with local one and PhotonNetwork.otherPlayers for list without local player.