question

cdw0424 avatar image
cdw0424 asked

"InfoResultPayload.PlayerProfile.DisplayName" returns "null".

When using C# PlayFabAllSDK in Unity.

In the PlayPep title, "DisplayName" exists,

but "InfoResultPayload.PlayerProfile.DisplayName" returns "null".

Why is that?

unity3d
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 am not able to see your request, but if the result only contains null, it can be cause by missing defined property in the request. In Authentication - Login With Custom ID API, you need to define InfoRequestParameters property in the request. For example,

var request = new LoginWithCustomIDRequest
{
    CustomId = "GettingStartedGuide",
    CreateAccount = true,
    InfoRequestParameters = new GetPlayerCombinedInfoRequestParams
    {
        GetPlayerProfile = true
    }
};

So that you may get player’s profile information via apiResult.InfoResultPayload.PlayerProfile

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.