@@ -66,11 +66,11 @@ protected void SetConnectionPayload(string playerId, string playerName)
66
66
m_ConnectionManager . NetworkManager . NetworkConfig . ConnectionData = payloadBytes ;
67
67
}
68
68
69
- /// Using authentication, this makes sure your session is associated with your account and not your device. This means you could reconnect
70
- /// from a different device for example. A playerId is also a bit more permanent than player prefs. In a browser for example,
69
+ /// Using authentication, this makes sure your session is associated with your account and not your device. This means you could reconnect
70
+ /// from a different device for example. A playerId is also a bit more permanent than player prefs. In a browser for example,
71
71
/// player prefs can be cleared as easily as cookies.
72
- /// The forked flow here is for debug purposes and to make UGS optional in Boss Room. This way you can study the sample without
73
- /// setting up a UGS account. It's recommended to investigate your own initialization and IsSigned flows to see if you need
72
+ /// The forked flow here is for debug purposes and to make UGS optional in Boss Room. This way you can study the sample without
73
+ /// setting up a UGS account. It's recommended to investigate your own initialization and IsSigned flows to see if you need
74
74
/// those checks on your own and react accordingly. We offer here the option for offline access for debug purposes, but in your own game you
75
75
/// might want to show an error popup and ask your player to connect to the internet.
76
76
protected string GetPlayerId ( )
@@ -156,7 +156,7 @@ public override async Task SetupClientConnectionAsync()
156
156
$ "host: { joinedAllocation . HostConnectionData [ 0 ] } { joinedAllocation . HostConnectionData [ 1 ] } , " +
157
157
$ "client: { joinedAllocation . AllocationId } ") ;
158
158
159
- await m_LobbyServiceFacade . UpdatePlayerRelayInfoAsync ( joinedAllocation . AllocationId . ToString ( ) , m_LocalLobby . RelayJoinCode ) ;
159
+ await m_LobbyServiceFacade . UpdatePlayerDataAsync ( joinedAllocation . AllocationId . ToString ( ) , m_LocalLobby . RelayJoinCode ) ;
160
160
161
161
// Configure UTP with allocation
162
162
var utp = ( UnityTransport ) m_ConnectionManager . NetworkManager . NetworkConfig . NetworkTransport ;
@@ -197,13 +197,15 @@ public override async Task SetupHostConnectionAsync()
197
197
198
198
m_LocalLobby . RelayJoinCode = joinCode ;
199
199
200
- //next line enable lobby and relay services integration
201
- await m_LobbyServiceFacade . UpdateLobbyDataAsync ( m_LocalLobby . GetDataForUnityServices ( ) ) ;
202
- await m_LobbyServiceFacade . UpdatePlayerRelayInfoAsync ( hostAllocation . AllocationIdBytes . ToString ( ) , joinCode ) ;
200
+ // next line enables lobby and relay services integration
201
+ await m_LobbyServiceFacade . UpdateLobbyDataAndUnlockAsync ( ) ;
202
+ await m_LobbyServiceFacade . UpdatePlayerDataAsync ( hostAllocation . AllocationIdBytes . ToString ( ) , joinCode ) ;
203
203
204
204
// Setup UTP with relay connection info
205
205
var utp = ( UnityTransport ) m_ConnectionManager . NetworkManager . NetworkConfig . NetworkTransport ;
206
206
utp . SetRelayServerData ( new RelayServerData ( hostAllocation , k_DtlsConnType ) ) ; // This is with DTLS enabled for a secure connection
207
+
208
+ Debug . Log ( $ "Created relay allocation with join code { m_LocalLobby . RelayJoinCode } ") ;
207
209
}
208
210
}
209
211
}
0 commit comments