File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Assets/BossRoom/Scripts/Shared/Net/ConnectionManagement Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -253,16 +253,24 @@ public void RequestDisconnect()
253
253
254
254
public string GetPlayerId ( )
255
255
{
256
- if ( OnlineMode == OnlineMode . IpHost )
256
+ var playerId = "" ;
257
+ if ( AuthenticationService . Instance . IsSignedIn )
257
258
{
258
- return ClientPrefs . GetGuid ( ) + ProfileManager . Profile ;
259
+ playerId = AuthenticationService . Instance . PlayerId ;
259
260
}
260
- if ( OnlineMode == OnlineMode . UnityRelay )
261
+ else if ( OnlineMode == OnlineMode . IpHost )
261
262
{
262
- return AuthenticationService . Instance . PlayerId ;
263
+ playerId = ClientPrefs . GetGuid ( ) + ProfileManager . Profile ;
263
264
}
264
- Debug . LogError ( $ "OnlineMode not set to a valid value: { OnlineMode } ") ;
265
- return "" ;
265
+ else if ( OnlineMode == OnlineMode . UnityRelay )
266
+ {
267
+ Debug . LogError ( "OnlineMode set to UnityRelay, but not signed in through AuthenticationService." ) ;
268
+ }
269
+ else
270
+ {
271
+ Debug . LogError ( $ "OnlineMode not set to a valid value: { OnlineMode } ") ;
272
+ }
273
+ return playerId ;
266
274
}
267
275
}
268
276
}
You can’t perform that action at this time.
0 commit comments