Android achievements
This tutorial will explain how to add achievements on the Google game services dashboard and how to add them to your game.
To add an achievement on Google game services, navigate to the "Achievements" tab, in the left navigation menu.
- Click on add achievement
- Enter a name for the achievement
- Add a description (not mandatory for testing)
- Add an icon (not mandatory for testing)
- Add an experience amount (at the bottom of the page, this can be greater than 200 and has to be a multiplication of 5)
Click save
That's it, you added an achievement to the Google game services.
If you want to make the achievement incremental, toggle the checkbox below the icon inputfield. And set the value between 2 and 10.000. Remember this value you set it to, you'll need that later on in this tutorial.
Adding the achievement in Unity
Once you have saved you achievement you'll be send back to the achievements page. Here you can find the Id of your achievement.
Copy this ID.
Now go back to you Unity project, and open the CP Social configurator (window -> CP Social -> Open configurator).
Depening on if you choose to create a single unlock or an incremental achievement, select the appropriate + button of the two achievement lists.
An empty achievement will be added with an Edit button next to it. Click on that edit button.
A new window will pop up where you can enter the details of your achievement. Enter these details as you want, these details will be available later in game.
Achievement details
- Unlocked sprite - The sprite that should be shown when the achievement is unlocked (useful for an in-game achievement menu)
- Hidden sprite - The sprite that should be shown when the achievement is still locked (useful for an in-game achievement menu)
- Display name - The name that should be displayed for this achievement (useful for an in-game achievement menu)
- Description - Short description of the achievement (useful for an in-game achievement menu)
- Universal name - Name used for referencing to this achievement, this will be the same on all platforms
- Android Id - Id of the achievement as show in the achievement on Google Game Services
For our achievement we are only going to need the Unversal name and the Android Id
After adding the details, you can close the details editing window.
That's it
That it, you have added an achievement to Google game services, and to your Unity project.