although i have set it to show location in the setting/Client profile options and I have created a
PlayerProfileViewConstraints and set locations true there as well and I Give that to my GetPlayerProfile Call it again returns null here's my code for it
var request = new GetPlayerProfileRequest { PlayFabId = result.PlayFabId }; PlayerProfileViewConstraints playerProfileViewConstraints = new PlayerProfileViewConstraints { ShowLocations = true }; PlayFabClientAPI.GetPlayerProfile(request, OnGetPlayerProfileSuccessCallback, OnGetPlayerProfileFailureCallback , playerProfileViewConstraints);
the above code is executed after the player has registered an account and is logged in
then in
OnGetPlayerProfileSuccessCallback
I will access the information and they are null:
void OnGetPlayerProfileSuccessCallback(GetPlayerProfileResult result) { Debug.LogWarning("playerprofile.displayName - " + result.PlayerProfile.DisplayName); Debug.LogWarning("playerprofile.PlayerId - " + result.PlayerProfile.PlayerId); Debug.LogWarning("customeData -- " + result.CustomData.ToString()); //result.PlayerProfile.Locations is NULL foreach (var item in result.PlayerProfile.Locations) { Debug.LogError("City: " + item.City + " Country: " + item.CountryCode); } }