From 5069e5bea7664b70576abfec00b3aeecbdd12873 Mon Sep 17 00:00:00 2001 From: Raigo Kovask Date: Tue, 9 Jul 2024 09:32:03 +0300 Subject: [PATCH] feat: go back after login --- .../Scripts/UI/AvatarCreatorStateMachine.cs | 7 ++++++- .../Scripts/UI/SelectionScreens/AvatarCreatorSelection.cs | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Samples~/AvatarCreatorSamples/AvatarCreatorWizard/Scripts/UI/AvatarCreatorStateMachine.cs b/Samples~/AvatarCreatorSamples/AvatarCreatorWizard/Scripts/UI/AvatarCreatorStateMachine.cs index d5a97d2b..59d04bb6 100644 --- a/Samples~/AvatarCreatorSamples/AvatarCreatorWizard/Scripts/UI/AvatarCreatorStateMachine.cs +++ b/Samples~/AvatarCreatorSamples/AvatarCreatorWizard/Scripts/UI/AvatarCreatorStateMachine.cs @@ -113,7 +113,12 @@ private void OnStateChanged(StateType current, StateType previous) private bool CanShowBackButton(StateType current, StateType previous) { - return current != startingState && current != previous; + return AuthManager.IsSignedIn switch + { + true => current != StateType.AvatarSelection, + false => current != startingState && current != previous + }; + } public void OnCustomizeDraft(string avatarId) diff --git a/Samples~/AvatarCreatorSamples/AvatarCreatorWizard/Scripts/UI/SelectionScreens/AvatarCreatorSelection.cs b/Samples~/AvatarCreatorSamples/AvatarCreatorWizard/Scripts/UI/SelectionScreens/AvatarCreatorSelection.cs index a64923a2..d0aa0d3c 100644 --- a/Samples~/AvatarCreatorSamples/AvatarCreatorWizard/Scripts/UI/SelectionScreens/AvatarCreatorSelection.cs +++ b/Samples~/AvatarCreatorSamples/AvatarCreatorWizard/Scripts/UI/SelectionScreens/AvatarCreatorSelection.cs @@ -1,12 +1,10 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Threading; using System.Threading.Tasks; using ReadyPlayerMe.AvatarCreator; using ReadyPlayerMe.Core; using UnityEngine; -using UnityEngine.Serialization; using UnityEngine.UI; using TaskExtensions = ReadyPlayerMe.AvatarCreator.TaskExtensions;