Hello, I am using Playfab in my card game.
I want to keep players scores in Playfab permanently. In each time player win, i want to change the new value with the old one.
Currently, i can successfully upload scores to the leaderboard, but i am resetting this daily. beside the leaderboard, i need to keep the scores as a data for each player and i will get them for each player from Playfab.
I made a research and found that i can do this by Player Data system. But unfortunately i couldn't understand the structure and how to manage it. I am using Playfab Unity SDK, and i made an API call by using "UpdateUserDataRequest " as you can see below;
Dictionary<string, string> _data = new Dictionary<string, string>(); _data.Add("PermanentGeneralScoreOnline", PlayerPrefs.GetInt("GeneralScore").ToString()); var req = new UpdateUserDataRequest() { Data = _data, }; PlayFabClientAPI.UpdateUserData(req, (success) => { Debug.Log("Success"); }, (error) => { Debug.LogError("Fail"); });
This worked for me to create a new key, but not for value. Value stayed zero.
Can you pls make a simple explanation for me.
Thanks,