On My unity app, inside login using email and password, I am using firebase login. My problem is when I try to call a function or execute a group code inside the task nothing happen. Not even an error. How to call a function inside this.
public void signin()
{
auth.SignInWithEmailAndPasswordAsync(email.text, password.text).ContinueWith(task => {
if (task.IsCanceled)
{
Debug.LogError("SignInWithEmailAndPasswordAsync was canceled.");
return;
}
if (task.IsFaulted)
{
Debug.LogError("SignInWithEmailAndPasswordAsync encountered an error: " + task.Exception);
return;
}
Firebase.Auth.FirebaseUser newUser = task.Result;
//========Checking Email Verified Or Not======
if(auth.CurrentUser.IsEmailVerified== true)
{
Debug.LogFormat("User signed in successfully: {0} ({1})",newUser.DisplayName, newUser.UserId);
//=================Here is the Problem this is not calling==========
MyFunction();
//==============================================
}
else
{
print("Email Not Verified");
auth.SignOut();
}
//===========
});
}