Hello together ![]()
I have got one little problem with switching the panels in my case.
With the OneClick event integrated from Unity it´s really easy. But in this case the next screen should only be shown of course, when the user types in correct user data (otherwise exception as you see in the code).
I mean it cannot be that hard, to set the next panel active and make the current one inactive, when the response is true…
Here the code:
public void SignInUserButton() {
SignInUser(SignInEmail.text, SignInPW.text);
}
//LogIn User
private void SignInUser(string email, string password) {
string userData = "{\"email\":\"" + email + "\",\"password\":\"" + password + "\",\"returnSecureToken\":true}";
RestClient.Post<SignResponse>("https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=" + AuthKey, userData).Then(
response => {
idToken = response.idToken;
localId = response.localId;
// At this point I want to open the next Panel and close this Panel....
GetUserInformation();
}).Catch(error => {
Debug.Log(error);
});
}
How would you go on? What would you recommend?
Thank you in advance ![]()