Unity Firebase: Can't change the color of an Image on RegistrationComplete
Hi, I would like to change the color of an Image when I register the user but the color is changing only in the inspector... And also I can't Invoke unity events in (task.isCompleted)
public void Registration()
{
Auth.CreateUserWithEmailAndPasswordAsync("emai2l@gmail.com", "password")
.ContinueWith((task =>
{
if (task.IsCanceled)
{
Firebase.FirebaseException e =
task.Exception.Flatten().InnerExceptions[0] as Firebase.FirebaseException;
GetAuthError((AuthError)e.ErrorCode);
return;
}
if (task.IsFaulted)
{
Firebase.FirebaseException e =
task.Exception.Flatten().InnerExceptions[0] as Firebase.FirebaseException;
GetAuthError((AuthError)e.ErrorCode);
return;
}
if (task.IsCompleted)
{
img.color = Color.red; // <== THIS IS THE IMAGE
Debug.Log("Registration Complete");
return;
}
}));
}
Her's a short video: https://giphy.com/gifs/fAPTd80taCSq1QRMOd
Basically on registration complete I would like to give feedback to the user.. I tried to set a bool to true and then on Update to change the color and it worked but is there a more efficient way? Thank you!
Your answer
Follow this Question
Related Questions
Inventory that loads data from an XML 0 Answers
how to define a user id securely 0 Answers
Get Other Players information (those who are installed) ? 0 Answers
How to setup AWS dynamoDB that I can CRUD (create, read, update, delete) data by Unity? 0 Answers
Mono.Data.Sqlite.SqliteException:Unable to open the database file at Mono.Data.Sqlite.SqLite3.Open 0 Answers