How to know if player connected to server

Options
I'm trying to tell a plyer that other player connected to server, so they can make a mathch
(my game is having a cute amount of ccu 2~4). so,
any ways??

Answers

  • artourky
    Options
    if(PhotonNetwork.connected)
    {
    // it's connected on MasterServer
    }
  • Hi @uzu,

    if your player is in the lobby he can regularly check PhotonNetwork.countOfPlayersOnMaster to see the current player count in the lobby (if autoJoinLobby property is set to true) or the master server.

    If one of your clients already has joined a room you can use OnPhotonPlayerConnected(PhotonPlayer newPlayer) callback to respond to joining players.