using System; using System.Threading.Tasks; using Object = UnityEngine.Object; namespace Thirdweb.Unity { public static class InAppWalletModal { public static async Task LoginWithOtp(InAppWallet wallet) { #if UNITY_6000_0_OR_NEWER var modal = Object.FindAnyObjectByType(); #else var modal = Object.FindObjectOfType(); #endif if (modal == null) { throw new Exception("No OTPVerifyModal found in the scene."); } return await modal.LoginWithOtp(wallet) as InAppWallet; } } }