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
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).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

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

ramonmelo
2022-01-17 12:26:22

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