custom propertyes help
Options
so i have this code:
but when i join on both clients it creates two rooms
and when i comment out:
they join each other
public void Start() { if { Hashtable expectedCustomRoomProperties = new Hashtable { { PRIVATE, "f" } }; PhotonNetwork.JoinRandomRoom(expectedCustomRoomProperties,0); } } public override void OnJoinRandomFailed(short returnCode, string message) { Hashtable cp = new Hashtable { { PRIVATE, "f" } }; RoomOptions roomOptions = new RoomOptions() { MaxPlayers = this.MaxPlayers }; if (playerTTL >= 0) roomOptions.PlayerTtl = playerTTL; roomOptions.IsVisible = true; roomOptions.CustomRoomProperties = cp; PhotonNetwork.CreateRoom(null, roomOptions, null); Debug.Log(roomOptions); }
but when i join on both clients it creates two rooms
and when i comment out:
//Hashtable expectedCustomRoomProperties = new Hashtable { { PRIVATE, "f" } }; PhotonNetwork.JoinRandomRoom(/*expectedCustomRoomProperties,0*/);
they join each other
0
Comments
-
Hi @i_is_a_duck,
Thank you for choosing Photon!
You need to specify which custom room properties keys need to be visible to the lobby and used for matchmaking when creating rooms:roomOptions.CustomRoomPropertiesForLobby = new string[1] { PRIVATE };
Here is the documentation section about this.
Here is the "Matchmaking Checklist" for any issues related to matchmaking.0