10

GPG Tutorial – Achievements and Leaderboards (Code)

This post contains all the code that’s been written in the YouTube video.

You can read it at your own pace, although watching the video prior to looking at this code example is recommended.

 

PlayGamesScript.cs

 

ManagerScript.cs

 

UIScript.cs

 

Matej
 

Matej is an app developer with a knack for teaching others. If he's not programming, making tutorials or doing other business, he's mostly working out, listening to audiobooks and taking cold showers.


  • Notice: Trying to get property of non-object in /home/resocode/public_html/wp-content/plugins/thrive-comments/includes/class-thrive-comments-front.php on line 540
    vikas says:

    thanks


  • Notice: Trying to get property of non-object in /home/resocode/public_html/wp-content/plugins/thrive-comments/includes/class-thrive-comments-front.php on line 540
    Sachin Birajdar says:

    Hello,
    I have done everything as you said and built apk and released app as alpha. But when click on Leaderboard button nothing happens.But my game is listed in “Play Games app of google” and there you can play actual game.I tried scoring some value but leaderboard didn’t added it..I don’t what went wrong.Please help me solve this issue.


  • Notice: Trying to get property of non-object in /home/resocode/public_html/wp-content/plugins/thrive-comments/includes/class-thrive-comments-front.php on line 540
    deyaa says:

    thank you

    but i have Problam

    Assets/ManagerScript.cs(21,49): error CS0117: GPGSIds' does not contain a definition for leaderboard_leaderboard’

    Assets/UIScript.cs(28,48): error CS0117: GPGSIds' does not contain a definition for achievement_incremental_achievement’

    Assets/UIScript.cs(33,45): error CS0117: GPGSIds' does not contain a definition for achievement_standard_achievement’

    can you help me


  • Notice: Trying to get property of non-object in /home/resocode/public_html/wp-content/plugins/thrive-comments/includes/class-thrive-comments-front.php on line 540
    Rafarel says:

    Thanks a lot for this quick introduction to Google Play!


  • Notice: Trying to get property of non-object in /home/resocode/public_html/wp-content/plugins/thrive-comments/includes/class-thrive-comments-front.php on line 540
    Ebrahim Mottaghi says:

    Thanx Man.
    That was an useful tutorial to cover.

  • thank you, really well done!


  • Notice: Trying to get property of non-object in /home/resocode/public_html/wp-content/plugins/thrive-comments/includes/class-thrive-comments-front.php on line 540
    Khrys says:

    anybody getting errors like: ‘GPGSIds’ does not contain a definition for ‘leaderboard_leaderboard’
    ?


  • Notice: Trying to get property of non-object in /home/resocode/public_html/wp-content/plugins/thrive-comments/includes/class-thrive-comments-front.php on line 540
    Khrys says:

    Got it, Thanks… was my leaderboard and achievements names. Sorry

  • Buy Social Shares

    qxtndqgls oecpf hludcao ouug ribwddmhbihuylu

  • >