I usage silent_login by default and “Login” button on main screen for those players, who disabled silent mode.
The Google Play Game Services extension has been updated with a crash fix for gpgs.leaderboard_get_player_score()
. The new version also contains a fix for general error handling where error messages weren’t correctly formatted.
There’s also ongoing work to fix a scenario where gpgs.leaderboard_submit_score()
doesn’t log the correct score in the leaderboard: https://github.com/defold/extension-gpgs/issues/25
How to unlock achievement? I’ve read the documentation but I’m bit confused about unlock, show and get functions?
And can I retrieve players highscore from leaderboard?
You unlock achievements by calling gpgs. achievement_unlock(achievement_id)
:
I think you want the gpgps.achievement_show()
function:
In fact, you can check the example project if you are unsure of how to use GPGS:
And:
What does achievement_get do? API doc doesnt have any description on that one.
Almost all Google Play Game Services APIs are asynchronous which means that you do not get the data immediately in the function call but some time later in a callback. In the example the achievement data is received in the callback here: