question

Vivek Deshpande avatar image
Vivek Deshpande asked

AvatarURL returns null

I'm using Unity v2017.1 with the latest PlayFab SDK. When I try to retrive the player avatar url during login, InfoResultPayload.PlayerProfile.AvatarUrl is always null. I have enabled client retrieval of the AvatarUrl through the dashboard.

A workaround for this bug is that AvatarUrl can be found at InfoResultPayload.AccountInfo.TitleInfo.AvatarUrl.

Player Data
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Yes, the addition of the basic elements of the player profile in the return from login predates the profile query and client profile options, which is why the dataset returned differs. I'll file a work item to look into expanding the data returned to include the options checked in the client profile options - for now, I would recommend getting the profile data from the profile query directly.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Vivek Deshpande avatar image Vivek Deshpande commented ·

If I understood the documentation correctly, this bug also exists in all API calls where PlayerProfileViewConstraints is an optional parameter (i.e. GetLeaderboard, GetLeaderboardAroundPlayer). When this parameter is null, only the default set of properties are returned.

0 Likes 0 ·
brendan avatar image brendan Vivek Deshpande commented ·

No, just the login calls. If you turn on the Avatar URL return in your Settings and set the ShowAvatarUrl parameter to true in the ProfileConstraints in a leaderboard call, you'll see that it is returned.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.