#Leaderboards removing invalid scores
1 messages · Page 1 of 1 (latest)
Probably some editor script using the Cloud Services API
https://docs.unity3d.com/Packages/com.unity.services.apis@1.1/manual/index.html#admin-api-client
Could use Unity CLI as well
Actually not sure there is a way to remove scores from a leaderboard now that i look at the API
Here it is
Thanks, managed to get it working
Any idea if there's a way to get the leaderboard entry metadata when requesting scores?
Ok, found it in the normal client APIs, doesn't seem to be possible in the admin ones
https://docs.unity3d.com/Packages/com.unity.services.apis@1.1/api/Unity.Services.Apis.Leaderboards.ILeaderboardsApi.html#Unity_Services_Apis_Leaderboards_ILeaderboardsApi_GetLeaderboardPlayerScore_System_String_System_String_System_String_System_Nullable_System_Boolean__System_Threading_CancellationToken_
But i'm getting the following error when trying to get the scores with the metadata included
Deserialization of type 'Unity.Services.Apis.Leaderboards.LeaderboardScoresPage' failed.
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: {. Path 'results[0].metadata', line 1, position 184.
var clientC = ApiService.CreateGameClient();
var responseC = await clientC.SignUpAnonymously(projectId);
var apiC = clientC.Leaderboards;
ApiResponse<Unity.Services.Apis.Leaderboards.LeaderboardScoresPage> scores = await apiC.GetLeaderboardScores(projectId, "0", true);
The code works correctly if i don't request the metadata
Are you certain metadata has been set for the scores? Sounds like the metadata might be null or somehow invalid in some way