public void LoggedIn(API_Login_Get instance) { if (instance.error == "") { Debug.Log("No Error"); } else { DisplayError(instance.error); return; } userID = instance.id; logInCanvas.SetActive(false); welcomeTxt.GetComponent <Text>().text = "Welcome " + instance.firstName; API_SearchContacts_Set input = new API_SearchContacts_Set { search = "", userId = userID }; api.SearchContacts(input); Destroy(welcomeTxt, 5f); }
void Login(string reply) { API_Login_Get data = JsonUtility.FromJson <API_Login_Get>(reply); BA.LoggedIn(data); }