///GetUserData() /// <summary> /// Retrieves UserData from PlayFab. /// </summary> /// Pre-Condition: Must be signed into a PlayFab account. /// Post-Condition: The Data from the PlayFab account will be retrieved. public static void GetUserData() { if (_playFabId == null) return; //PlayFab API call requires a request to retrieve data. var GetUserDataRequest = new PlayFab.ClientModels.GetUserDataRequest(){ PlayFabId = _playFabId }; //PlayFab API call to retrieve data from the PlayFab account. PlayFabClientAPI.GetUserData(GetUserDataRequest, (result) => { Debug.Log(_playFabId + "GetUserDataRequest"); foreach (var entry in result.Data) { Debug.Log(entry.Key + ": " + entry.Value.Value); //This will be used for Clear Data. _Key.Add(entry.Key); } DataResult.Invoke(result); }, (error) => { Debug.Log(_playFabId); Debug.Log("Error: GetUserData()"); Debug.Log(error.ErrorMessage); } ); }