반응형
플레이팹 로그인이 되었다는 가정하에 진행
저장
public void UpdatePlayerStatistics(string key, int value)
{
PlayFabClientAPI.UpdatePlayerStatistics(new UpdatePlayerStatisticsRequest
{
Statistics = new List<StatisticUpdate>
{
new StatisticUpdate { StatisticName = key, Value = value },
}
},
result =>
{
Debug.Log("User statistics updated");
},
error =>
{
Debug.LogError(error.GenerateErrorReport());
});
}
불러오기
public void GetStatistics()
{
PlayFabClientAPI.GetPlayerStatistics(
new GetPlayerStatisticsRequest(),
(Action<GetPlayerStatisticsResult>)((result) =>
{
foreach (var statistics in result.Statistics)
{
switch (statistics.StatisticName)
{
}
if(statistics.Equals(""))
{
}
}
}), DisplayPlayfabError);
}
반응형