How to change the MasterClient if the player is destroyed but is still in Room?

Options

Hello,

I know that Photon automatically assigns new MasterClient if the old MasterClient leaves the room/game but in my game players can spectate other players, how can I automatically transfer the MasterClient if the old MasterClient (player) is destroyed but still in the room?

Answers

  • Tobias
    Options

    Personally, I wouldn't do that. When a player is dead in-game but still connected, this player could still act as Master Client. It doesn't have to switch due to logic.

    You can use Room.SetMasterClient if you really need to.