Setup Guide
Open Settings Window
Go to Tools -> Gley -> Game Services
Download SDK
Select Android platform.
Press Download Google Play Games SDK and import the plugin in your unity project
Add IDs
App ID
Go to your Google Play developer console and select your game.
Go to configuration and copy your Project ID.
Paste your Project ID inside Google Play App ID field
Achievement IDs
Go to your achievements in Google Play Console
Add your achievements ID inside Settings Window
Add new achievement | Adds a new achievement field |
Remove | Removes the achievement field |
Achievement Name | Achievement Name (can only contain alphanumeric characters - no white spaces or special characters). From the achievement names an enum will be automatically generated and it will be later used in code to submit the achievement. |
Google Play ID | Store ID |
Leaderboard IDs
Get your leaderboard IDs from Google Play
Add your leaderboard IDs inside Settings Window
Add new leaderboard | Adds a new leaderboard field |
Remove | Removes the leaderboard field |
Leaderboard Name | Leaderboard Name (can only contain alphanumeric characters - no white spaces or special characters). From the leaderboard names an enum will be automatically generated and it will be later used in code to submit the scores. |
Google Play ID | Store ID |
Save
Every time you make a change inside Settings Window press the Save button.
Preparing the build
Before building your app, make sure to Force Resolve the android libraries.
Go to Assets->External Dependency Manager -> Android Resolver -> Force Resolve
Build
If you get this error at build:
Go to Assets -> Plugins -> Android and delete GooglePlayGamesManifest
This warning is normal. Is thrown by Google SDK because you did not use their setup window. Just close it.
Test
Achievements and Leaderboards only work if your app is uploaded to the store and downloaded using your test user. They do not work inside Editor or if you build & run your app on device.
To test if your SDK integration and your IDs are correct please build the test the scene provided:
Assets/Gley/GameServices/Example/Scenes/GameServicesTest.unity
Last updated