void DisplayFriends(List <FriendInfo> friendsCache) { foreach (FriendInfo f in friendsCache) { bool isFound = false; if (myFriends != null) { foreach (FriendInfo g in myFriends) { if (f.FriendPlayFabId == g.FriendPlayFabId) { isFound = true; } } } if (isFound == false) { GameObject listing = Instantiate(ListingPrefab, friendScrollView); ListingPrefabb tempListing = listing.GetComponent <ListingPrefabb>(); //Debug.Log(tempListing.playerNameText); //Debug.Log(f.TitleDisplayName); tempListing.playerNameText.text = f.TitleDisplayName; } } myFriends = friendsCache; //HERE }
void OnGetLeaderboard(GetLeaderboardResult result) { //leaderBoardPanel.SetActive(true); //Debug.Log(result.Leaderboard[0].StatValue); foreach (PlayerLeaderboardEntry player in result.Leaderboard) { GameObject tempListing = Instantiate(ListingPrefab, listingContainer); ListingPrefabb LL = tempListing.GetComponent <ListingPrefabb>(); LL.playerNameText.text = player.DisplayName; LL.playerScoreText.text = player.StatValue.ToString(); Debug.Log(player.DisplayName + ": " + player.StatValue); } }