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 can I get PlayerRef of MasterClient in current session ( shared mode, nightly 1.1.2 )

SlattBurger
2022-08-26 18:33:28

Hello,

I need to get PlayerRef of MasterClient in current session, basically equivalent of PhotonNetwork.MasterClient in PUN.

How do I do that ?

Comments

Isaac_Augusto
2022-08-29 11:30:38

Hi,

Object.StateAuthority should work, if it don't, you can store on a NetworkBehaviour checking on Spawned() if is the MasterClient, if so, store the PlayerRef on a Networked property.


Isaac Augusto

Photon Fusion Team

Back to top