반응형
플레이팹 로그인이 되었다는 가정하에 진행
저장
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);
}
반응형
'개발 > Playfab' 카테고리의 다른 글
유니티 플레이팹 닉네임 변경, 불러오기 Playfab NickName 간단 사용법 (0) | 2022.07.08 |
---|---|
유니티 플레이팹 유저 프로필 가져오기 Playfab GetProfile 간단 사용법 (0) | 2022.07.08 |
유니티 플레이팹 유저 데이터 불러오기 Playfab GetUserData 간단 사용법 (0) | 2022.07.08 |
유니티 플레이팹 유저 데이터 가져오기 Playfab SetUserData 간단 사용법 (0) | 2022.07.08 |
유니티 플레이팹 상점 카테고리 가져오기 Playfab GetCatalog 간단 사용법 (0) | 2022.07.02 |
유니티 플레이팹 유저 인벤토리 가져오기 Playfab GetUserInventory 간단 사용법 (0) | 2022.07.02 |
유니티 플레이팹 구글 로그인 Playfab Sign In with Google Login 간단 구현 (0) | 2022.06.22 |
유니티 플레이팹 게스트 로그인 Playfab Sign In with Guest Login 간단 사용법 (0) | 2022.06.21 |
댓글