-
Notifications
You must be signed in to change notification settings - Fork 966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User's Image and AvatarURL are always NULL. #1113
Comments
Getting the local user image is actually working. As the image get's fetched with a Coroutine, you will most likely have to wait and check when the image is loaded (it will only start loading when you call .image), and it is also a good idea to run the coRoutine LoadImage right at the beginning for all players that you want to get the image for. What's not working, though: getting the avatarUrls for other players. As the avatarUrl is always null, there is no way to get the images of opponents. Any solution for this problem? |
Did anyone find a solution to this? I'd like to retrieve avatars for opponent users but their PlayGamesUserProfile always comes back with a null AvatarURL. I'm also seeing the same behaviour with the Prime31 GPGS plugin so I wonder if I'm missing a permission or whether it actually isn't possible to retrieve other user's avatars in the Play Games platform? |
I didn't. But I am also still interested in a solution. |
Are you finding all users have null URLs or only some? I've discovered one cause of null avatarURLs can be if the user in question played your game before setting up their Google Gamer profile. In this scenario the game will receive their Google+ user id and avatarURL and if this was never set up then will be null, even though they have a Gamer avatar. Google should provide the user's Gamer profile explicitly rather than this confusing hybrid scheme where you can receive one or the other. |
Wondering if there has been any updates on this, as I am also currently facing this issue and have scoured the web with no answers :( I realize that the culprit is under the LoadUsers function within AndroidClient.cs - the player argument that is being passed into AndroidJavaConverter.ToPlayer(player) is faulty as the player object always does not contain an AvatarUrl, which causes no avatar image to be generated causing an null exception. This is opposed to the same function AndroidJavaConverter.ToPlayer(player) being called when the game loads through private void SignInOnResult(bool isAuthenticated, Action callback) function, where the player object being passed in is clean and will always have an avatarURL. I'm a relatively new programmer so I've been trying to figure out why one function can pass in a player object that's good but another function can be passing in a player object that always has no avatarURL into the same function but it seems to be beyond me at the moment - any help greatly appreciated |
I want to show the avatars of all the players participating in a multiplayer game. But I can't seem to find a way to accomplish that as "ParticipantInfo.Player.AvatarURL" and "ParticipantInfo.Player.image" always return NULL.
I can't even seem to get the avatar of currently logged in user. "PlayGamesPlatform.Instance.localUser.image" also always returns NULL.
Please fix the problem. I want to release my game ASAP but it is delayed due to this problem. I'm using version 0.9.32.
The text was updated successfully, but these errors were encountered: