How to set MasterClient in SharedMode?
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on Fusion.
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 set MasterClient in SharedMode?
Mami
2022-01-13 09:01:51
Hello everyone,
I want to set someone special as a MasterClient. But I don't know how to do this. In Pun 2 I was able to "PhotonNetwork.MasterClient = Player". How can I do this in Fusion?
Comments
Hi @Mami ,
The concept of MasterClient
only applies if you are running Fusion in SharedMode, which is similar to how PUN works.
If that is the case, the Peer that has created the Game Session will initially be the MasterClient
of the Session, and you can check this by looking at:
Runner.IsSharedModeMasterClient
: https://doc-api.photonengine.com/en/fusion/current/class_fusion_1_1_network_runner.html#a8874f7b7126ad02fafd5895fecc84586
Also, on the Fusion API, there is no way to force one of the Peer to be the MasterClient
of the Session, this only changes when the current MasterClient
leaves the Session, and another peer is automatically selected to be the new `MasterClient.
--
Ramon Melo
Photon Fusion Team
Back to top