How do I get a players title display name to show in game. I tried looking at the documentation but I can't figure it out. Can i get some sample code?
How do I get a players title display name to show in game. I tried looking at the documentation but I can't figure it out. Can i get some sample code?
You can get the Title Display Name any number of ways. If you mean for a single user, the https://api.playfab.com/documentation/client/method/GetAccountInfo API call would be a good one to use. But all the leaderboard API calls also return the TDN info for all the players in the list.
If you literally mean how to create UX to display the name, we don't provide specific libraries or tools for graphics. PlayFab is entirely a backend service - we do not interfere in the presentation layer of the game in any way. But have provided an example "game" that you can use as a template for your own work, assuming you're a Unity developer: https://github.com/PlayFab/UnicornBattle
Hi, thanks for the response, but I'm not so sure how to go about calling that API and getting a title display name. I was asking for some sample code on the function call itself.
The API documentation specifically shows an example of making each call as a simple Web API request, but there's also an example of this specific API call in C# in this thread: https://community.playfab.com/questions/358/206712347-show-display-name.html.
Assuming you're a Unity user though, the UnicornBattle example linked above specifically has code showing how to make a wide range of calls into PlayFab. I'd highly recommend having a look at it for examples.
2 People are following this question.