Hi
I am Woking on getting player statistics but it is giving NullReferenceException: Object reference not set to an instance of an object ProfileInfoController.profils (PlayFab.ClientModels.GetPlayerProfileResult result).
This is the code
public int TotalGames;
public void GetStats(int id)
{
var stats = new GetPlayerProfileRequest();
stats.PlayFabId = "id";
PlayFabClientAPI.GetPlayerProfile(stats, OnGetStats, OnError);
}
void OnGetStats(GetPlayerProfileResult result)
{
// from down line error is coming
TotalGames = result.PlayerProfile.Statistics[0].Value;
}