The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

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.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

How does the master client know others players joined room?

2019-08-14 08:10:42

I would like others players joined room after master client will receive callback.


2019-08-14 11:25:51

Hi @Frp529,

Thank you for choosing Photon!

There is a callback when another remote player joins the room: IInRoomCallbacks.OnPlayerEnteredRoom(Player newPlayer).
There is a callback when the local player joins the room: IMatchmakingCallbacks.OnJoinedRoom().
To get the list of all players in the room: PhotonNetwork.CurrentRoom.Players.
To know if a player is MasterClient or not: Player.IsMasterClient.

Back to top