public void AddFriendSearchList(List <Friend> SearchFriend) { SearchInputfield.text = ""; if (SearchFriend == null || SearchFriend.Count < 1) { Debug.Log("친구없음"); } else { foreach (Friend items in SearchFriend) { GameObject FriendContent = GameObject.Instantiate(FriendInfoPref, SearchListRoot.transform); if (FriendContent == null) { return; } DemoFriendInfoUI contentui = FriendContent.GetComponent <DemoFriendInfoUI>(); if (contentui == null) { return; } contentui.SetContentText(items); } } SearchButton.interactable = true; }
public void AddFriendList() { RefreshButton.interactable = true; InitFriendList(); List <Friend> friendList = UserManager.Instance.GetFriendList(); if (friendList == null || friendList.Count < 1) { return; } foreach (Friend items in friendList) { GameObject FriendContent = GameObject.Instantiate(FriendInfoPref, FriendListRoot.transform); if (FriendContent == null) { return; } DemoFriendInfoUI contentui = FriendContent.GetComponent <DemoFriendInfoUI>(); if (contentui == null) { return; } contentui.SetContentText(items); } }