Ok well. Let us see here, you did the “setup” and entered your info, so you must already have an acct and stuff ready, so that means part of the battle is over lol. Now you need to put this in your script thats going to handle loading and hiding ads. Start at the top of what will be your ad handler script with this:
using GooglePlayGames;
using UnityEngine.SocialPlatforms;
and then say in the Start() method do this:
PlayGamesPlatform.Activate();
and once thats done, you must authenticate you user (this can take some amount of time on mobile networks - possible over a minute, so start near load time of your game so its ready when game scenes start getting loaded in, or before player can do anything) doing something like this:
// authenticate user:
Social.localUser.Authenticate((bool success) => {
// handle success or failure
if(success) // the login completed successfully
{
LoggedIntoPlayServices = true; // some bool to let us know later were logged in ok before trying to unlock achievements or send scores to a leaderboard
}
});
and then even further along the code chain you need to maybe unlock an achievement:
// unlock achievement (achievement ID "Cfjewijawiu_QA")
Social.ReportProgress("Cfjewijawiu_QA", 100.0f, (bool success) => {
// handle success or failure
if(success) // we have successfully sent our acheivement to the play servers
{
// maybe we should show some info in game to alert the player (besides the toaster pop up from the plugin - which is flakey)
}
});
or maybe we need to post to a leaderboard:
// post score 12345 to leaderboard ID "Cfji293fjsie_QA")
Social.ReportScore(12345, "Cfji293fjsie_QA", (bool success) => {
// handle success or failure
if(success)
{
// might do something like...
if(NeverEnteredScoreBefore)
{
GivePlayerCookie(); // some sort of interaction after loading the scores... perhaps show the leader boards themselves?
}
}
});
and you will see many more examples on the readme’s of those plugins!
Good Luck… again! lol