User Management
Creating and logging in of anonymous users
public static async Task LoginAsAnonymous() public static void SetUser(UserSession session)private async void Start()
{
if (PlayerPrefs.HasKey("StoredSession"))
{
AuthManager.SetUser(JsonUtility.FromJson<UserSession>(PlayerPrefs.GetString("StoredSession")));
}
else
{
await AuthManager.LoginAsAnonymous();
}
}
private void OnApplicationQuit()
{
PlayerPrefs.SetString("StoredSession", JsonUtility.ToJson(AuthManager.UserSession));
}Log in to a Ready Player Me account
Last updated
Was this helpful?

