parse-community / Parse-SDK-dotNET

Parse SDK for .NET, Xamarin, Unity.
http://parseplatform.org
Apache License 2.0
322 stars 260 forks source link

I can't Load a scene through SceneManager when I use the Async Parse Method #364

Open Kellokes opened 2 years ago

Kellokes commented 2 years ago

New Issue Checklist

Issue Description

I can't Load a scene through SceneManager when I use the Async Parse Method, like SingUpAsync().

Steps to reproduce

This is the function that I'm trying to execute when I register an user:

public void Register(string Username ,string Email, string Password){

        var user = new ParseUser()
        {
            Username = Username,
            Password = Password,
            Email = Email
        };

        user.SignUpAsync().ContinueWith(t =>
        {   

            if (t.IsFaulted || t.IsCanceled)
            {
            Debug.Log("We weren't able to register you, try again!");
            }
            else
            {   
                Debug.Log("Account created!");
                SceneManager.LoadScene("Login");
                //registered = true;

            }

        });

    }

Actual Outcome

The scene doesn't load, but the Debug.Log("Account created!") appears on console.

Expected Outcome

I expect the scene Login appears after I received the response of SignUpAsync method.

Environment

Logs