Skip to content

Commit

Permalink
Remember me usage in sample
Browse files Browse the repository at this point in the history
  • Loading branch information
voropserg committed Feb 20, 2023
1 parent 28b70af commit 15b8c56
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Samples~/LegacyJamDemo/Scripts/TotemDemoManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ void Start()
totemCore = new TotemCore(_gameId);

legacyGameIdInput.onEndEdit.AddListener(OnGameIdInputEndEdit);

UILoadingScreen.Instance.Show();
totemCore.AuthenticateLastUser(OnUserLoggedIn, (error) =>
{
UILoadingScreen.Instance.Hide();
});
}

#region USER AUTHENTICATION
Expand Down Expand Up @@ -119,6 +125,12 @@ private void OnUserLoggedIn(TotemUser user)

public void ShowAvatarRecords()
{
if (firstAvatar == null)
{
return;
}


GetLegacyRecords(firstAvatar, TotemAssetType.avatar, (records) =>
{
UIAssetLegacyRecordsList.Instance.BuildList(firstAvatar, records);
Expand Down

0 comments on commit 15b8c56

Please sign in to comment.