question

activedreaminc avatar image
activedreaminc asked

How to Add PlayFab Display Name? (C# Script)

Hi, I have developed a login system, I managed to add email/password as a way to authenticate and it works well but I would like to have the player set a Display Name as well. How to do that in C# script? Thank you

Account ManagementAuthenticationgame manager
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

You can use https://api.playfab.com/documentation/client/method/UpdateUserTitleDisplayName. It's also available in all our SDKs.

5 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.

activedreaminc avatar image activedreaminc commented ·

Hi Brendan, thank you for your reply. How to get the PlayFab Display Name of a player in C# script? Thank you

1 Like 1 ·
Joshua Strunk avatar image Joshua Strunk activedreaminc commented ·

You can use https://api.playfab.com/documentation/client/method/GetAccountInfo to retrieve any user's display name using a PlayFabID, Email, or Username.

0 Likes 0 ·
activedreaminc avatar image activedreaminc commented ·

Hi Brendan, thank you for your reply. How to get PlayFab Display Name from a player in C# script? Thank you

1 Like 1 ·
Janderson avatar image Janderson activedreaminc commented ·

I think that you need create a form with header .

ex:

string json = @"{ 'PlayFabID': 'MYID' }";

Dictionary<string, string> headers = new Dictionary<string, string>();

headers.Add("Content-Type", "application/json");

headers.Add("Content-Length", json.Length.ToString());

json = json.Replace("'", "\"");

byte[] data = System.Text.Ecoding.UTF8.GetBytes(json);

WWW www = new WWW(URL, data, headers);

then you give yield on www.

its work for me and i think that's should help you.

0 Likes 0 ·
activedreaminc avatar image activedreaminc commented ·

Thank you everyone :)

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.