@@ -66,11 +66,11 @@ protected void SetConnectionPayload(string playerId, string playerName)
6666            m_ConnectionManager . NetworkManager . NetworkConfig . ConnectionData  =  payloadBytes ; 
6767        } 
6868
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, 
7171        /// 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 
7474        /// 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 
7575        /// might want to show an error popup and ask your player to connect to the internet. 
7676        protected  string  GetPlayerId ( ) 
@@ -156,7 +156,7 @@ public override async Task SetupClientConnectionAsync()
156156                $ "host: { joinedAllocation . HostConnectionData [ 0 ] }  { joinedAllocation . HostConnectionData [ 1 ] } , "+ 
157157                $ "client: { joinedAllocation . AllocationId } ") ; 
158158
159-             await  m_LobbyServiceFacade . UpdatePlayerRelayInfoAsync ( joinedAllocation . AllocationId . ToString ( ) ,  m_LocalLobby . RelayJoinCode ) ; 
159+             await  m_LobbyServiceFacade . UpdatePlayerDataAsync ( joinedAllocation . AllocationId . ToString ( ) ,  m_LocalLobby . RelayJoinCode ) ; 
160160
161161            // Configure UTP with allocation 
162162            var  utp  =  ( UnityTransport ) m_ConnectionManager . NetworkManager . NetworkConfig . NetworkTransport ; 
@@ -197,13 +197,15 @@ public override async Task SetupHostConnectionAsync()
197197
198198            m_LocalLobby . RelayJoinCode  =  joinCode ; 
199199
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 ) ; 
203203
204204            // Setup UTP with relay connection info 
205205            var  utp  =  ( UnityTransport ) m_ConnectionManager . NetworkManager . NetworkConfig . NetworkTransport ; 
206206            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 } ") ; 
207209        } 
208210    } 
209211} 
0 commit comments