public void callRequests() { UsersButtonScript buttonScript = sendRequest.GetComponent <UsersButtonScript>(); buddyName = buttonScript.nameLabel.text; App42API.Initialize("47675efb1d62deab9e46b9d43795e45c381c341bec9033abb9622fa1a88e5720", "256e86ad5fe1038aaf20334d51c894f1dfa9839996dbaa2e92376141761a07f0"); BuddyService buddyService = App42API.BuildBuddyService(); buddyService.SendFriendRequest(TestUser._testUser.UserName, buddyName, message, new UnityCallBack()); }
void CreateAllUsers() { for (int i = 0; i < user.Count; i++) { if (TestUser._testUser.UserName != user[i].GetUserName()) { GameObject newButton = Instantiate(myGO) as GameObject; newButton.name = user[i].GetUserName(); newButton.transform.SetParent(deleteChildsOf.transform, false); UsersButtonScript buttonScript = newButton.GetComponent <UsersButtonScript>(); buttonScript.nameLabel.text = user[i].GetUserName(); } } }