question

Van houtte avatar image
Van houtte asked

Get the Displayname from the Unity Code

Hello,

I am in the embarra on a scene I implemented the Displayname but I can not use this function to recover the Diplayname on another scene here is how my test does not work,

I would just like to store it in "playerName" to eventually call it in another script.

Thank you for your help.

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

·
Citrus Yan avatar image
Citrus Yan answered

Hi Van, according to the error logs of yours , it says “the Displayname field is required” while you did not provide such parameter. You could try this code below to see if it works:

public void YourNameSave()  { 


UpdateUserTitleDisplayNameRequest request = new UpdateUserTitleDisplayNameRequest()  

     { 
	DisplayName = playerName  

     };  

PlayFabClientAPI.UpdateUserTitleDisplayName(request, NameSave, ErrorName)

}

Any issues let us know:)

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.