All players in just one room?

Options
I've been wondering if it's actually possible to make all players connect to the same room no matter the amount?

Comments

  • Nightology
    edited November 2018
    Options
    Hi @OsayedZ

    I think this is possible, just add "PhotonNetwork.JoinOrCreateRoom" in the function "OnConnectedToMaster ()" :
    public override void OnConnectedToMaster()
    {
    	RoomOptions options = new RoomOptions { MaxPlayers = 100 };
    	PhotonNetwork.JoinOrCreateRoom("RoomName", options, null);
    }
    When the player starts your game and connects to Photon, he launches the "OnConnectedToMaster ()" function, and in this function, he will launch "PhotonNetwork.JoinOrCreateRoom ()".
    If the room named "RoomName" can not be joined, then we created it

    if I'm not mistaken of course

    Thank you