Hello,
I checked the forums but couldn't find anything related to my issue. I am having issues saving game data in Unity3d. In our game we save our app once it is quit by the user (i.e. OnApplicationQuit()). The issue is that we do not see any data on the user in the dashboard. We have tested saving in other locations and it does work. It just seems that saving in OnApplicationQuit() or OnDisable() won't work. Here is the code I am using to save the data:
private void CloudSave(string pJsonData) {
UpdateUserDataRequest request = new UpdateUserDataRequest() {
Data = new Dictionary<string, string>(){
{PATH, pJsonData},
}
};
PlayFabClientAPI.UpdateUserData(request, (result) =>
{
Debug.Log("Success!");
}, (error) =>
{
Debug.Log(error.ErrorDetails);
});
}
My question is, is that by design? Is there a way to save the user data before the user quits the app?
Note: I have been testing this in the editor but have not tried it on a device.