question

robert avatar image
robert asked

Error in PlayerProfile, Statistics, GetLeaderboard

Looks like there is an Unity SDK implementation error when using GetLeaderboard (Server or Client API).


Using the new ProfileConstraints with ShowLocations = true returns a list of PlayerLocation objects inside the PlayerProfile property of each entry.


For some reason the PlayerProfile definition in PlayFabClientModel.cs and PlayFabServerModel.cs expect a:

public Dictionary<string,PlayerLocation> Locations;

which of course cannot be serialised then.

Changing this to:
public List<PlayerLocation> Locations;

makes everything working.

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

Sorry for the confusion on this - what you have is the SDK version that shipped with the data format for the initial release of the profile info in leaderboards. The 3/13 release notes call out the breaking change on the profile data (https://api.playfab.com/releaseNotes/). Compounding this is a) we were not able to publish the updated Unity SDK until this morning, and b) our documentation site doesn't have the latest change - that'll be pushed later today. If you get the latest SDK, it is correct for the data returned. Again, our apologies that this has been a bumpy release - under normal circumstances we would have a new feature that might be in flux tagged as Beta to make sure developers are prepared for potential changes.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

robert avatar image robert commented ·

Thanks, updated the SDK fixed the problem

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.