In today’s tutorial video, I show you how to add Google Play Games Services to your Unity game. You can use Google Play Games Services to add leaderboard, achievements, events, multiplayer functionality and more to your Android game. I cover everything you need to do so be sure to check out the time codes below if you want to skip around.
As always let me know if you have any questions or need me to clarify anything! Enjoy!
Time Codes:
0:00 – Tutorial Scope/Prerequisites
2:28 – Downloading/Importing Play Games Plugin for Unity
3:28 – Android Player/Build key Setup
4:43 – Adding JDK to your Windows environment path
6:43 – Creating a new game in the Google Play
8:13 – Generating the OAuth2.0 Client id
10:45 – Creating a Leaderboard
12:10 – Getting the GPGS resources for our configured game
12:37 – Giving beta testers access to your game
13:26 – GPGS Setup in Unity
14:03 – Unity Project Overview
15:36 – Play Games Controller C# Script
16:11 – Authenticating Users with GPGS
17:43 – Posting Scores to a leaderboard
19:30 – Showing the leaderboard UI
20:38 – UI Controller C# Script
22:44 – Final Configurations and Making a Build
23:32 – Demonstrating Functionality on Android Device
25:32 – Our Game in the Play Games App
26:50 – Outro
Resources:
My Unity Project – https://drive.google.com/open?id=1rbc71Cu6NRrCtG68fjWboWswJUvpnbii
Google Play Games Plugin for Unity – https://github.com/playgameservices/play-games-plugin-for-unity
Google Play Developer Console – https://play.google.com/apps/publish
Adding additional permissions to GPGS – https://github.com/playgameservices/play-games-plugin-for-unity#adding-additional-scopes
Google Play Leaderboard API – https://github.com/playgameservices/play-games-plugin-for-unity#accessing-leaderboard-data
Please ‘Like’ this video and share it with anyone who is interested in video game development.
Subscribe to the channel for much more independent video game developer related content including tutorials, design breakdowns, industry events, VLOGs, and much more fun stuff!
Links:
Blog:
https://turbomakesgames.com
My Game Development Studio’s Website:
https://homecookedgames.com
My GitHub:
https://github.com/JohnnyTurbo
Music by: Joakim Karud http://youtube.com/joakimkarud
My Setup:
Camera – Yi Action Cam – https://amzn.to/2FSRxLk
Webcam – Logitech C922x Pro – https://amzn.to/2HTinFp
27″ 4K Monitor – Asus PG27AQ – https://amzn.to/2Mkg7X2
Laptop – Asus GL502VS – https://amzn.to/2FNKiET
Keyboard – Das Keyboard 4 Ultimate – https://amzn.to/2W7SHZd
Other Keyboard – Ducky One 2 Mini – http://bit.ly/2I8ivQI
Headset – PlayStation Platinum Wireless Headset – https://amzn.to/2FR6n58
As an Amazon Associate I earn from qualifying purchases.
#GooglePlay #GameDev #AndroidTutorial
Can we get an updated version? Process has changed, it's actually sort of hard to follow. Their process, not yours. Regardless, thanks for your contribution. The tutorial's a bit shorter at 1.25x speed 😀
How do u link your achievements to Xbox gamer score I used to do it on windows phone does it not work on android?
i have been bouncing around so many different tutorials and documentations that I have completely lost myself in this process…
At some point I had already set up a google cloud platform project for my game. Now when I go into the API access tab in Play Console, I cannot choose my project in "Link Existing Project" dropdown… it doesn't show up. Any advice? I have some of the code written and implemented for a Sign In button in Unity, but it fails. I do see some API calls but showing tons of errors on the various consoles i have to sign into… so frustrating
Are the games fake
I have won thauntion of dollars on the games not received any of it why
Very clear tutorial! Thanks for the whole explanation. This is really clear now!
Anybody can help me? I trying to add google serves to my game but every time I failing. I refresh SHA-1 code and all plugins. But in play console wrote that I should “Add google play serves SDK”. I don’t know how do this. Also I describe a problem:when I build my game, publishing in google and open, google services don’t working. I mean the screen add some dark for a second, then nothing. I don’t know what to do. (Google service plugin in unity is 0.10.12).
I've got a question: is there a leadboard on close?
thanks for sharing! i've didn't watch it to the end yet, but i am pretty positiv that i'll gain exactly the infos that i need.
Thx for this!
Hey man. First of all thanks for the tutorial. I have a question though. I know the video is old and all, but I am struggling with an issue where I can log in to google play games without any problems in my alpha build, but any testers cannot. Do I have to enable for other people to be able to login or something?
When I create the APK build for my android and try to play, google play services can't connect and I don't know why :c
This whole process in the Developer Console and Google Cloud Platform is 2-3x longer now. It's a PITA. But in the same time (over 2 years) the leaderboards are still just as extremely basic
All of this is good, but you'd have to have a completely different parallel system if you also launch on iOS.. and another one on desktop.. Are there no cost effective platform agnostic front end login systems and backend systems that are indie friendly?
Please help! I am only doing sign in part. After building it show Signing in to Google Play games but then after it cancelled. It dont show any email it just cancelled!
Do I need to create 3 different ID client OAuth 2.0 to make it work in debug, release and publishing?
I'm reading this bit here fyi https://assetstore.essentialkit.voxelbusters.com/game-services/faq#what-are-different-sha-fingerprints-that-needs-to-be-used-for-logging-in-successfully-on-different-environments-and-how-to-create-them
After following a different tutorial a couple months ago, and giving up completely, I finally got it working for my new game thanks to you!
Hey, is it normal that in unity im getting "Unable to sign in to Google Play Services" error? How can i fix it. And after installing apk on my device play games doesnt launch
If you are using Win10 and setting path (as shown) it is not allowing access to keytool despite it being correct path? Anyways the solution is this:
copy your desired bin folder path
open cmd
enter : set Path=(then paste the path you copied with no parenthesis OR spaces after the = )
should look something like this (note: do not copy and paste this)
set Path=C:Program FilesJavajdk1.8.0_211bin
if success there should be no message and can now type keytool and should see list of commands
Can someone please help me, it's not working in my case 😶
whqt if i unistand and reinstall the game will i he able to see the leaderboard with my name and score and the score that was before i uninstalled it?
I imported into Unity but I've a lot of errors. Why?
So if we close the game then open it again should we enter e mail to the play games again
Crack! Thank u so much!
I am getting this error in the adb logcat when I try to sign in. Would you know what's causing it? Google doesn't seem to be much help for troubleshooting it. I want to say something is wrong with he oAuth2 client, but I set up hooks for both my build SHA1 and my Google Play managed SHA1 so it should be working no matter what build I am using.
"[Play Games Plugin 0.10.11] 09/26/20 21:32:51 –05:00 ERROR: No client available, returning null"
you are amazing can you make the video of openCv integration in unity
Thanks for the Most Comprehensive walk-through mate.
Love from India <3
Great Tutorial. Worked Perfectly. Thanks A lot.
It was a solid tutorial but still i cant seem to implement this sign in service to my already existing game. And I dont get any errors. How can i identify the problem?
Two years aftear releasing the video, it is still helpfull.
I was so lost about google play, but thanks to you its everything working now.
Thank you so much.
18:54 all of those hard work to hide ur GPGSid with blur editing 🙂 finally revealed 😀
Wow! Thank you for the tutorial. If you guys wanna see what game I made using it please check out https://play.google.com/store/apps/details?id=com.Larchwood_Studios.Endangered_Ducky
Great tutorial!
I had issues signing into the Google Play Store. My issue was:
The only certificate the command prompt provided me with was the SHA256, which is much longer than the required SHA1. I didn't realize this mistake at the time, so I used the SHA256, and my app did not work.
To change this, there's no need to delete anything. Just go back to your command prompt and instead of:
$ keytool -list keystore
type:
$ keytool -list -v -keystore
Then, it'll show both SHA1 and SHA256.
Copy the SHA1 and navigate to https://console.developers.google.com/apis/credentials
Find your game under 'OAuth 2.0 Client IDs', and paste in the 'SHA-1 certificate fingerprint'.
Then save.
No need to rebuild, just close and run the app again and it should work.
My score didn't automatically post to the leaderboard, but I just had to change 'All' to 'Friends', then change the preferences so everyone can see my score, then it worked.
i an having a minsdk problem!!! Please Help!!!!!
works! thank you
you ruined my whole game no button just the bag appears in your mouth
thanks man this was a very easy tutorial thanks for explaining everything very easily!!
Hello, according to your operation, the last prompt Authentication Canceled is required. How to solve this
This is the information I was looking for. Thank you so much.
Thank you for the video. One question: is there a way to display a non fullscreen leaderboard? For exemple when you finish a level , display the leaderboard next to some other UI (like play again button etc.)?
it worked!
SEN ADAMIN DİBİSİN!
This is amazing, never touched Google Play services before and got everything integrated and working in the game I'm developing! Thank you very much!
In the editor it throwd error and on my phone its not logging nor throwing errors…why???