question

jrDev avatar image
jrDev asked

Adding to GameManager Leaderboard

Hello,

 

So I just created a leaderboard stat using the Playfab Game Manager but what do I do next to access that leaderboard to add values to it?

Thanks,

jrDev

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

The statistics reported for players are the entries in the leaderboards. By default, UpdatePlayerStatistics is not enabled for the Client (since we don't trust the client to not cheat), so I'd recommend calling it from Cloud Script, so that you can put appropriate cheat checking into the script ahead of the statistics update call.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jrDev avatar image
jrDev answered

Hey,

 

Thanks for the help.

Is there tutorial showing how to use Unity with Cloudscript to do this?

Thanks,

jrDev

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Yes, there's an example script in all of the samples here (https://github.com/PlayFab/PlayFab-Samples) which shows writing statistics using UpdatePlayerStatistics. These examples currently show using RunCloudScript (our older API) to call the scripts, but we'll be updating them to use ExecuteCloudScript soon.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.