How to know player is the host?
Options
Best Answer
-
Hi @Owen:
In Photon, games are not hosted by players, but by the Server.
However for most purposes including yours you can treat the master client as the host.
The master client is the client for which the return value ofPlayer::getNumber()
matches the value that is returned byMutableRoom::getMasterClientID()
.Player::getIsMasterClient()
returns true, if the player instance on which this function is called is the master client. There is always exactly one master client per room.5
Answers
-
Hi @Owen:
In Photon, games are not hosted by players, but by the Server.
However for most purposes including yours you can treat the master client as the host.
The master client is the client for which the return value ofPlayer::getNumber()
matches the value that is returned byMutableRoom::getMasterClientID()
.Player::getIsMasterClient()
returns true, if the player instance on which this function is called is the master client. There is always exactly one master client per room.5