Hello; i have following Problem:
When i login the main menu scene appears with a textfield which shows the "SkillRating" of your player. This works perfectly fine until i switch to the game scene: the game (another scene) also has a textfield with the SkillRating of your player but this time the SkillRating always shows 0 and when i go back to the main menu the SkillRating is also set to 0. Here is my Code for the GetPlayerStatisticsRequest:
Can anyone explain me why the SkillRating changes after i swap the scene?
private void Awake() { getSkillRating(); } public void getSkillRating() { var request = new GetPlayerStatisticsRequest(); request.StatisticNames = new List<string>() { "SkillRating" }; PlayFabClientAPI.GetPlayerStatistics(request, OnGetSRSuccess, OnSetSRError); } private void OnSetSRError(PlayFabError obj) { throw new NotImplementedException(); } private void OnGetSRSuccess(GetPlayerStatisticsResult obj) { print("SR received"); foreach (var stat in obj.Statistics) { skillRating = stat.Value; } skillRatingText.text = skillRating.ToString(); }