Dear PlayFab community,
I'm working with the Unity SDK (C#) and CloudScript (TypeScript).
I'm trying to reconcile some differences between the Player Data object for Unity and CloudScript. I believe that I am up-to-date with both SDKs (typings for TypeScript).
My Unity SDK shows the UserDataRecord as:
public class UserDataRecord { /// <summary> /// Data stored for the specified user data key. /// </summary> public string Value; /// <summary> /// Timestamp for when this data was last updated. /// </summary> public DateTime LastUpdated; /// <summary> /// Indicates whether this data can be read by all users (public) or only the user (private). This is used for GetUserData requests being made by one player about another player. /// </summary> public UserDataPermission? Permission; }
And my CloudScript.d.ts shows the corresponding object as:
/** https://api.playfab.com/Documentation/Server/datatype/PlayFab.Server.Models/PlayFab.Server.Models.GetUserDataResult */ interface GetUserDataResult { /** PlayFab unique identifier of the user whose custom data is being returned. */ PlayFabId?: string, /** * Indicates the current version of the data that has been set. This is * incremented with every set call for that type of data (read-only, internal, * etc). This version can be provided in Get calls to find updated data. */ DataVersion: number, /** User specific data for this title. */ Data?: { [key: string]: UserDataRecord }, }
Note that the client has a LastUpdated field, and the server has a DataVersion field. I'm wondering why there is a discrepancy here, and why *both* properties wouldn't potentially be returned to both environments (client and server)?
Thanks for any help anyone can provide!