Getting Started - StansAssets/com.stansassets.android-native GitHub Wiki

To use the API, you must first configure your game in the Google Play Developer Console. Follow the instructions on creating a client ID. Be particularly careful when entering your package name and your certificate fingerprints, since mistakes on those screens can be difficult to recover from.

If you intend to use real-time or turn-based multiplayer in your game, remember to activate those features in the Google Play Developer Console when creating your application instances.

Enable API

Make sure that Google play API is enabled under the Android Native services.

GettingStarted4

Copy the game resources from the console

Once you configure at least one resource (event, achievement, or leaderboard), copy the resource configuration from the Google Play Developer Console, and paste it into the setup configuration in Unity. To get the resources go to the Achievements tab, then click on "Get resources" on the bottom of the list.

GettingStarted

Select all the contents of the resources window, and copy them to the clipboard.

GettingStarted2

After that, click the "Set Game Resource" button and paste the game resources into the plugin dialog. See the example below:

GettingStarted3

AN_GamesIds Code Generation

For your convenience when you set the Resources you can see what values do you have inside using plugin UI:

You can also press the Generate AN_GamesIds.cs file which will generate the AN_GamesIds.cs file in your project that would look similar to:

namespace SA.Android.GMS.CodeGen
{
    public static class AN_GamesIds
    {
        public const string AppId = "721571874513";

        public static class Achievements
        {
            public const string GrandPlayer = "CgkI0Y2kiIAVEAIQAg";
            public const string ProApiUser = "CgkI0Y2kiIAVEAIQAw";
            public const string GameMaster = "CgkI0Y2kiIAVEAIQBA";
            public const string GreenDroid = "CgkI0Y2kiIAVEAIQBQ";
            public const string Achievement5 = "CgkI0Y2kiIAVEAIQBg";
            public const string SuperLongIncemental = "CgkI0Y2kiIAVEAIQCQ";
            public const string DraftAchieve = "CgkI0Y2kiIAVEAIQDQ";
        }

        public static class Leaderboards
        {
            public const string BestApiUsers = "CgkI0Y2kiIAVEAIQBw";
            public const string BestTime = "CgkI0Y2kiIAVEAIQCA";
        }
    }
}