How To Use GOOGLE PLAY GAMES SERVICES With UNITY!

  Рет қаралды 5,716

Freedom Coding

Freedom Coding

Күн бұрын

In this tutorial, I'll be showing you how to use Google Play Games Services in Unity, which will allow you to create custom events, leaderboards, achievements, and more! I'll also be teaching you how to save and load JSON files. All of this is often used in mobile games and apps even you might not even know it!
Feel free to ask me any questions, like and subscribe!
JSON TUTORIAL - • Unity SAVE DATA To Fil...
GITHUB REPO - github.com/playgameservices/p...
CODE - docs.google.com/document/d/1E...
Website - www.freedom-coding.com
Facebook - profile.php?...
Timestamps:
00:00 Intro
00:28 Importing Packages to Unity
01:49 Setting Up Unity
03:18 Google Play Console
04:53 Google Cloud
07:00 Get SHA-1 certificate
09:41 Adding Achievements, Events, Leaderboard...
13:33 Building The Project!
17:00 Test #1
18:30 Saving/Loading JSON Files!
21:53 Test #2
22:32 Outro

Пікірлер: 47
@rasitakgul
@rasitakgul 11 ай бұрын
It was very helpful. Thank you so much
@thecater6424
@thecater6424 Жыл бұрын
I love You bro! This is the perfect tutorial for Google play services
@michalmargetinsk
@michalmargetinsk 10 ай бұрын
Super tutorial! Na začiatku som si ani nevšimol že si čech 😀.
@freedomcoding
@freedomcoding 10 ай бұрын
Jsem rád, že ti tutoriál pomohl!
@slavomirzatko5133
@slavomirzatko5133 6 ай бұрын
Hey, this is a perfect tutorial, isn't it? Thank you so much! Greetings from Slovakia, my čech brother!
@freedomcoding
@freedomcoding 6 ай бұрын
I am glad you liked it! Greetings to you too, my Slovak brother :)
@davutinat
@davutinat 7 ай бұрын
Hello, I made the google play console settings and added a logo on the OAuth consest screen. Later, after the tests, I wanted to publish it on the OAuth consest screen and it asked me for a lot of requirements. After some research, I realized that I shouldn't add a logo, so I clicked on the edit app and removed the logo. Then, when I clicked publish, it changed the application from test to production status. My application is now live on the play store and I wonder if Publishing Status is important in the OAuth consest screen? So I published the app and whoever downloads it can successfully Authenticate and submit their score to the leaderboard?
@freedomcoding
@freedomcoding 7 ай бұрын
Hi, I am not an expert in this. Did you test it? I would say production status is okay...
@davutinat
@davutinat 7 ай бұрын
Yes I tested it and I did it with a user who was not a test user. I think it works :)@@freedomcoding
@godspowerjemifor4739
@godspowerjemifor4739 Жыл бұрын
Hello, nice video. Thank you! Also, can you show how to change the keystore fingerprint and api keys to live from testing when development is done and also uploading the app to playstore?
@freedomcoding
@freedomcoding Жыл бұрын
Thanks! I will be soon releasing my own app, so I can then make a video on this.
@scil4
@scil4 3 ай бұрын
I have followed all the steps you do in the video but when I press play in Unity, I still get the red fail screen that appeared to you at the beginning.... Do you know what could be the solution?
@freedomcoding
@freedomcoding 3 ай бұрын
Hi, did you take a look in the log to see what error it is giving you? docs.unity3d.com/Manual/android-debugging-on-an-android-device.html#usb-debugging
@giacomoguercio1015
@giacomoguercio1015 28 күн бұрын
Do you know if Google apply you some fee when using Google Save Data?
@freedomcoding
@freedomcoding 27 күн бұрын
Hi, it seems that there is no fee - www.quora.com/Are-the-Google-Play-Game-Services-totally-free
@scil4
@scil4 3 ай бұрын
Could you please make another tutorial video like this one but updated?
@freedomcoding
@freedomcoding 3 ай бұрын
Sorry, but it is not on my list currently. Maybe some time in the future.
@itaytamir4382
@itaytamir4382 3 ай бұрын
Thanks for the tutorial! I followed all the steps but the app fails to authenticate with Google Play Game on the mobile device + I get the same red screen you see in Unity and a message: Failed to authenticate with Canceled. Did you encounter this issue?
@itaytamir4382
@itaytamir4382 3 ай бұрын
Nvm, I solved the issue. When you download the app from the store you need to use the Sha-1 from the App signing key certificate in the App signing section for the cloud credentials. Thank you for the great tutorial!
@freedomcoding
@freedomcoding 3 ай бұрын
Thanks for sharing the solution. I am glad you fixed it and liked the tutorial!
@scil4
@scil4 3 ай бұрын
@@itaytamir4382 I have the same issue, but I don't understand you. How can I solve the issue? thank you
@itaytamir4382
@itaytamir4382 2 ай бұрын
@@scil4 Hi! If you have the same Sha-1 issue that I had then you need to use the correct sha-1 key for each situation: If you're downloading the app from the Play Store use the Sha-1 under the App signing key certificate section (under App signing) to create the cloud credentials in the Google Cloud console. How do you install the game on your device? From the store or using apk? Hope this helps :)
@adslpiulentoditalia2545
@adslpiulentoditalia2545 Жыл бұрын
Hey. I'm so thankful for this. The things that you make looks so easy. Btw I want to give you some tips. There's no need to set minimum API android to 10 because in some scripts of google it just enough to set minimum API to 25 so you can actually build for lollipop android version. Actually now it's saving and loading fine the only problem is that I encountered that once you delete and clear data apk it seems that google cloud can't retrieve the saved data back and I don't know why. Could be that a bug or something? It's working fine while I don't clear data from my game but then all the data restart back again. Let's say I have 500 golds as the default after collecting some let's say 550 and saving to cloud works fine but after clearing the data of apk... cloud restore again to 500 even if it was saving for 550 I have no clue why is this happening. Is that does for you as well?
@freedomcoding
@freedomcoding Жыл бұрын
I am glad it was helpful! I think that when you delete the app data you would need to check if there is data on the cloud and if yes then download it and store it locally once more but I am not sure. I have been doing some research and I know that other people have been definitely doing more checks for the data.
@adslpiulentoditalia2545
@adslpiulentoditalia2545 Жыл бұрын
@@freedomcoding I'm actually using that I made a json file as a local save which is more faster that the cloud to make sure that everytime it gonna save it as some point. But after checking it from scripts and saying in the code if there's a data on the cloud which return true but for some reason it reset it instead of retrieve the last saved. :( My order of saving data is something like this: 1. If there's no save data I create a Json file as a local save 2. If Json data exists and checking if the cloud contains some data to load otherwise I'm gonna save this string to google cloud 3. And after that if users gonna clear data then I make sure that first we create Json file and then checking for cloud againg and then load it.
@knightwill2871
@knightwill2871 10 ай бұрын
For me, I will record total playTime so that when there is data that has long playTime will override the shorter one.
@thawzan7370
@thawzan7370 Жыл бұрын
does this work with pc build?
@freedomcoding
@freedomcoding Жыл бұрын
Google play games services i mainly for mobile games, so I am not sure. I will test it!
@md_rofique
@md_rofique Жыл бұрын
Where can I find the achievementui script?
@md_rofique
@md_rofique Жыл бұрын
I don't have that maingui script also
@freedomcoding
@freedomcoding Жыл бұрын
@@md_rofique In the video i showed you how to download the example project from Github. You can find the link to Github in description.
@artdesireboutique
@artdesireboutique 5 ай бұрын
Shouldn't the Client ID be a WEB client and not ANdroid?
@freedomcoding
@freedomcoding 5 ай бұрын
It is quite some time since I worked with Google Play Services. If it works, why change it? :D
@freedomcoding
@freedomcoding 5 ай бұрын
Someone else may be able to give you a better answer.
@cosmiccube2961
@cosmiccube2961 Жыл бұрын
Do you know anything about old data and existing data?
@freedomcoding
@freedomcoding Жыл бұрын
You mean saving data locally and then checking for changes and either downloading new data or saving it to cloud? I havent done that but I have a friend who did so I could try it and record a video about it if that is what you want 😀
@cosmiccube2961
@cosmiccube2961 Жыл бұрын
@@freedomcoding When you save data a second time it doesn't work because the old data overwrites the new data.
@freedomcoding
@freedomcoding Жыл бұрын
@@cosmiccube2961 I will take a look at it.
@cosmiccube2961
@cosmiccube2961 Жыл бұрын
@@freedomcoding Thank you buddy.
@calvinms7503
@calvinms7503 Жыл бұрын
Cannot Add Credential, the button is not clickable
@freedomcoding
@freedomcoding Жыл бұрын
This is most likely because you forgot to set up something. Have you set up the OAuth correctly?
@calvinms7503
@calvinms7503 Жыл бұрын
@@freedomcoding My bad, when I opened google cloud, there was no project, so I made a new project, turned out this new project is not link with the one in the PlayConsole. When I checked the list of the project, there is a project associated with my game in the PlayCOnsole :)
@Ballistic_Defense
@Ballistic_Defense Жыл бұрын
if (status != SavedGameRequestStatus.Success) { Debug.LogError("Error opening saved game"); isSaving = false; return; } the status always returns "internal error", has anyone experienced this or have a solution to it for google saved games?
@lucassantos2805
@lucassantos2805 6 ай бұрын
did you fixed it?
@Ballistic_Defense
@Ballistic_Defense 6 ай бұрын
@@lucassantos2805 Yes: kzbin.info/www/bejne/aJ7RaK1mmcmhbNEsi=gChOtcwEv9-b4LgF
SAVE DATA In Unity - Player Prefs
1:48
Freedom Coding
Рет қаралды 172
Better Coding in Unity With Just a Few Lines of Code
15:27
Firemind
Рет қаралды 304 М.
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 162 МЛН
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 7 МЛН
Женская драка в Кызылорде
00:53
AIRAN
Рет қаралды 293 М.
20 Advanced Coding Tips For Big Unity Projects
22:23
Tesseract
Рет қаралды 167 М.
[2021] Google Play Game Services  #0 - Making it work
32:29
Flarvain
Рет қаралды 23 М.
INSANE shooter with WAY too many bullets (Unity ECS Tutorial) - PART 1
15:20
What Happened To Google Search?
14:05
Enrico Tartarotti
Рет қаралды 3,1 МЛН
EA Won't Let Me Play This Game - So I Hacked It
8:49
Nathan Baggs
Рет қаралды 300 М.
Unity to Google Spreadsheet - Sending Data the Easy Way
13:29
One Wheel Studio
Рет қаралды 2,1 М.
Using Image Recognition to DESTROY Fruit Ninja
10:08
CodeNoodles
Рет қаралды 602 М.
How to : Integrate Google Play login into your Unity project
25:13