question

Jatin Jain avatar image
Jatin Jain asked

'The DisplayName entered is not available' even after allowing it in settings

I'm developing a game in Unity. I've checked the box in settings to 'Allow non-unique player display names.

Now when I register a player from Playfab website then I can save duplicate name. But when doing it from my game using API, I get this error 'The DisplayName entered is not available'.

How do I allow users to enter non-unique display names in my game.

apisunity3d
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

·
Seth Du avatar image
Seth Du answered

I have tested the API in my title and cannot reproduce your issue. Both Game Manager and API calls can update DisplayName even though it is duplicated.

What is the DisplayName you have input? Have you set the correct the title ID when you are using API calls?

In addition, can you provide your title ID and corresponding player ID. We can check it for you.

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.

Jatin Jain avatar image Jatin Jain commented ·

Here's the exact code I'm using to register user. I'm using it in Unity. Whatever Display name I try, it throws an error saying DisplayName is not available. But I can manually add user with duplicate DisplayName from playfab website.

TitleId and everything else is correct.

void RegisterUser(string email, string password, string dname)
        {
            PlayFabClientAPI.RegisterPlayFabUser(new PlayFab.ClientModels.RegisterPlayFabUserRequest()
            {


                Email = email,
                Password = password,
                DisplayName = dname,
                TitleId = "81E7F",
                RequireBothUsernameAndEmail = false


            },
            result => {
                Debug.Log("Successfully registered user");
                return;
            },
            error => {
                Debug.Log("Got error");
                Debug.Log(error.GenerateErrorReport());
                return;
            });
        }
0 Likes 0 ·
Jatin Jain avatar image Jatin Jain commented ·

Okay I just realized this. If the name I'm duplicating was registered AFTER allowing it in settings then I can duplicate it. But if the name I'm duplicating was registered before allowing it in settings then I can't duplicate it.

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.