- Home /
Question by
Last_Flame · Jan 10, 2018 at 10:34 AM ·
c#google play gamesimage loader
Can't load leaderboard users images from google play game service
Hello, i'm trying to saving a list of Texture2D from the leaderboard but it always ends up to be empty (even if i keep it loading for a while). Can you help me?
public void LoadUsernames()
{
for (int i = 0; i < usersData.Count; i++)
{
usersIds.Add(usersData[i].userID); //Get all the usersId inside usersData
}
Social.LoadUsers(usersIds.ToArray(), (users) =>
{
foreach (IScore score in usersData)
{
IUserProfile user = FindUser(users, score.userID);
if (user != null)
{
usersName.Add(user.userName);
usersTexture.Add(user.image);
}
}
StartCoroutine(LoadingUsersName());
});
}
Once the Textures are stored inside usersTexture i've a raw image and i simply assing every single texture to the raw images, but usersTextures alway end up be empty. I've tried to in the same way Social.localUser.image to the raw image and it works.
Thanks for your time
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
No valid name for platform: 37 1 Answer
Renderer on object disabled after level reload 1 Answer
Google Play Leaderboard won't show up if game is downloaded from Google Play 0 Answers