Save Player Stats before they disconnect or force quit game - PUN+ with PlayFab

Options
I'm using PUN+ along with PlayFab and I am looking for a way to be able to save a player's stats in the case they get disconnected or pull the plug for whatever reason. I'm not entirely sure how I'd go about that and have tried looking for info on it, but to no avail. Am I supposed to store certain properties of the player in order to save their stats without them being in the game?

At the moment, the only way the stats save is if the match reaches the end, or if one player were to leave then the remaining player would win and their updated stats would be saved, but I'm unable to add the loss to the player who leaves.

Any help would be appreciated, thanks!

Comments