How to know if player connected to server
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
How to know if player connected to server
uzu
2017-02-11 19:58:15
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??
Comments
if(PhotonNetwork.connected)
{
// it's connected on MasterServer
}
[Deleted User]
2017-02-13 14:12:57
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.