question

agniesportsyt avatar image
agniesportsyt asked

How to display avatar - Player Profile Pic

I wanted to display player's avatar or the players profile pic and the display name in my game's main menu. I am using GetPlayerProfile to show the displayname. But I dont know how to display the avatar image. I searched a lot but i didnt find even a single clue. So please provide me with the right information and provide code if needed for better understanding. Thank u in advance.

apisPlayer DataAccount Management
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

·
Sarah Zhang avatar image
Sarah Zhang answered

If you want to allow the player to access other’s Avatar URL, you need to do the settings on your title’s Game Manager first. Please refer to this section to do the settings. This thread’s answers also gives the detailed description about how to update the Avatar URL to Profile and how to request it.

To display the avatar image in the game, you need to download the image first. You can implement the download methods on your own or use the SimpleGetCall method that provided in the PlayFab SDK. To learn the usage of SimpleGetCall, you can refer to this document. After you download the image, you need to render it as the texture of GUI to display it. Different development platforms provide different ways of rendering images. You can consult the corresponding platform provider for more details.

10 |1200

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

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]