When I try to use Player Accounts (in engine to test before compile) it doesn’t seem to submit to cloud panel at UGS. Any idea why that is? I can provide code if needed.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using Unity.Services.Authentication;
using Unity.Services.Authentication.PlayerAccounts;
using Unity.Services.Core;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using Unity.Services.Moderation;
using Unity.Services.Moderation.Models;
using Unity.Services.Moderation.Exceptions;
public class UnityLoginThing : MonoBehaviour
{
async Task SignInWithUnityAsync(string accessToken)
{
try
{
await AuthenticationService.Instance.SignInWithUnityAsync(accessToken);
Debug.Log("SignIn is successful.");
}
catch (AuthenticationException ex)
{
// Compare error code to AuthenticationErrorCodes
// Notify the player with the proper error message
Debug.LogException(ex);
}
catch (RequestFailedException ex)
{
// Compare error code to CommonErrorCodes
// Notify the player with the proper error message
Debug.LogException(ex);
}
}
async Task LinkWithUnityAsync(string accessToken)
{
try
{
await AuthenticationService.Instance.LinkWithUnityAsync(accessToken);
Debug.Log("Link is successful.");
}
catch (AuthenticationException ex) when (ex.ErrorCode == AuthenticationErrorCodes.AccountAlreadyLinked)
{
// Prompt the player with an error message.
Debug.LogError("This user is already linked with another account. Log in instead.");
}
catch (AuthenticationException ex)
{
// Compare error code to AuthenticationErrorCodes
// Notify the player with the proper error message
Debug.LogException(ex);
}
catch (RequestFailedException ex)
{
// Compare error code to CommonErrorCodes
// Notify the player with the proper error message
Debug.LogException(ex);
}
}
}