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

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);

Answers

Sign In or Register to comment.