Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Random matchmaking is not working after setting user id in AuthValues.

$
0
0
Hi,

Random matchmaking is not working after setting user id in AuthValues. Players always join different rooms. I am using latest version of PUN+ (1.89). Match making works if i don't set AuthValues. I don't want to use authentication. I just want to set user id so that player can rejoin the game after disconnect. Below is the code


PhotonNetwork.AuthValues = new AuthenticationValues(userId);
PhotonNetwork.autoCleanUpPlayerObjects = true;
PhotonNetwork.ConnectUsingSettings("1.0");


Here is the code for creating room


RoomOptions options = new RoomOptions();
options.MaxPlayers = 4;
options.PlayerTtl = 60000;
options.EmptyRoomTtl = 60000;
options.PublishUserId = true;
TypedLobby lobby = new TypedLobby("TempLobby", LobbyType.Default);
PhotonNetwork.CreateRoom(null, options, null);


Code to search room


TypedLobby lobby = new TypedLobby("TempLobby", LobbyType.Default);
PhotonNetwork.JoinRandomRoom(null, MAX_PLAYERS, MatchmakingMode.FillRoom, null, null);

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>