Get PlayService Settings resources
PlayService Settings Inspector window has next special items:
- Application ID
- Other Resources' IDs, such as Leaderboards, Achievements, Quests.
How to properly add, edit and remove this resources will be described below.
First, we need to clarify, that all Google Play Service Resources names and IDs are saved in Plugins/Android/AN_Res/res/values/ids.xml file
So, by editing this file you can edit Play Service Resources names and IDs.
If you have no such file in your Unity Project, you should create one (anyway, warning in Inspector window will be displayed).
At the very begining this file is empty. You have to add new rosurces to it.
You can get resources of your application for Google Play Service in Google Play Console.
Open your Google Play Console, select application, select Game services and select any of bottom sections (on the screenshot below Achievement section is selected).
To get all resources for your app, click on Get resources link as shown above.
Next window with XML strings will be displayed
That's what you need! Just copy this XML content and paste it to ids.xml file inside your Unity project.
If you are using such methods from GooglePlayManager class as:
public void ShowLeaderBoard(string leaderboardName) public void ShowLeaderBoardById(string leaderboardId) public void SubmitScore(string leaderboardName, long score) public void SubmitScoreById(string leaderboardId, long score) public void UnlockAchievement(string achievementName) public void UnlockAchievementById(string achievementId) public void IncrementAchievement(string achievementName, int numsteps) public void IncrementAchievementById(string achievementId, int numsteps)
Remember! If you are using a method where RESOURCES NAME is passing as a parameter, you should use those values as shown on the screenshot below
If you are using a method where RESOURCES id is passing as a parameter, you should use corresponding values as shown on the screenshot below
If you are updating Google Play Service resources in your Google Play Console, don't forget to update them in your Unity project ids.xml file.