diff --git a/Packages/Sequence-Unity/Sequence/SequenceFrontend/Scripts/UI/LoginPage.cs b/Packages/Sequence-Unity/Sequence/SequenceFrontend/Scripts/UI/LoginPage.cs index f7762e0c9..649c87047 100644 --- a/Packages/Sequence-Unity/Sequence/SequenceFrontend/Scripts/UI/LoginPage.cs +++ b/Packages/Sequence-Unity/Sequence/SequenceFrontend/Scripts/UI/LoginPage.cs @@ -3,6 +3,7 @@ using Sequence.EmbeddedWallet; using TMPro; using UnityEngine; +using System.Collections; namespace Sequence.Demo { @@ -160,5 +161,24 @@ private void EnableLoadingScreen(bool enable) { _loadingScreen.SetActive(enable); } + + private void OnApplicationFocus(bool hasFocus) + { +#if !UNITY_IOS + if (hasFocus) + { + StartCoroutine(DisableLoadingScreenIfNotLoggingIn()); + } +#endif + } + + private IEnumerator DisableLoadingScreenIfNotLoggingIn() + { + yield return new WaitForSecondsRealtime(0.1f); + if (!LoginHandler.IsLoggingIn()) + { + EnableLoadingScreen(false); + } + } } } \ No newline at end of file diff --git a/Packages/Sequence-Unity/package.json b/Packages/Sequence-Unity/package.json index 2f236858b..8e2606e9b 100644 --- a/Packages/Sequence-Unity/package.json +++ b/Packages/Sequence-Unity/package.json @@ -1,6 +1,6 @@ { "name": "xyz.0xsequence.waas-unity", - "version": "3.17.4", + "version": "3.17.5", "displayName": "Sequence Embedded Wallet SDK", "description": "A Unity SDK for the Sequence WaaS API", "unity": "2021.3",