Question by
Joaqstarr · Jan 26 at 01:19 AM ·
networkauthentication
Stuck awaiting anonymous sign in with Unity authentication service.
it doesn't get passed authentication. I am just calling this in the start method.
async Task SignInAnonymouslyAsync()
{
try
{
awaiting = true;
await AuthenticationService.Instance.SignInAnonymouslyAsync();
awaiting = false;
Debug.Log("Sign in anonymously succeeded!");
// Shows how to get the playerID
Debug.Log($"PlayerID: {AuthenticationService.Instance.PlayerId}");
}
catch (AuthenticationException ex)
{
// Compare error code to AuthenticationErrorCodes
// Notify the player with the proper error message
Debug.LogException(ex);
}
catch (RequestFailedException exception)
{
// Compare error code to CommonErrorCodes
// Notify the player with the proper error message
Debug.LogException(exception);
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613052141im_/https://answers.unity.com/themes/thub/images/avi.jpg)