how can i set RomeOptions to JoinRandomRoom() ?
Options
hello, basically i want to rejoin to a specific room if in case one of my player gets disconnected.
So, for that i have to set TTL RoomOption. it cant be set with CreateRoom(). But, if i want to use JoinRandomRoom(), then how do i set this?
Bottomline is, Can rejoining be achieved in JoinRandomRoom() ?
So, for that i have to set TTL RoomOption. it cant be set with CreateRoom(). But, if i want to use JoinRandomRoom(), then how do i set this?
Bottomline is, Can rejoining be achieved in JoinRandomRoom() ?
0
Comments
-
Not really understood the question. Find a room with a "TTL" key?
Here is an example -void OnConnectedToMaster() { Hashtable expectedCustomRoomProperties = new Hashtable() { { "room", "TTL" } }; PhotonNetwork.JoinRandomRoom(expectedCustomRoomProperties, 0); } public virtual void OnPhotonRandomJoinFailed() { RoomOptions roomOptions = new RoomOptions(); roomOptions.MaxPlayers = 10; roomOptions.CustomRoomProperties = new Hashtable() { { "room", "TTL" } }; roomOptions.CustomRoomPropertiesForLobby = new string[] { "room" }; PhotonNetwork.CreateRoom(SceneManager.GetActiveScene().name, roomOptions, null); }
In the overloaded functions of the "JoinRandomRoom" there is no parameter of the data type "RoomOption"
https://doc-api.exitgames.com/en/pun/current/class_photon_network.html#aa9a112ccaaf71a296b823e9637584445
0