Hello, I'm using unity relay to set up the peer-to-peer connections for my Unity game that uses Netcode for GameObjects. Previously, I was using Unity Lobby, which I have replace it with Playfab Lobby. But now I'm facing an issue on how I can transfer the relay code to the players in the Lobby. I've tried to set it up the relay code as part of the lobby data, but then I have no clue how to fetch it from the joining player. Here's the snipet of my code for creating the lobby:
var createRequest = new CreateLobbyRequest()
{
LobbyData = new Dictionary<string, string>()
{
{"RelayCode",relayJoinCode}},
MaxPlayers = 2,
OwnerMigrationPolicy = OwnerMigrationPolicy.None,
Owner = new EntityKey()
{
Id = playerId,
Type = "title_player_account"
},
Members = new List<Member>
{ new Member() { MemberEntity = new EntityKey()
{
Id = playerId,
Type = "title_player_account"
}
}
},
UseConnections = false,
};