Unity Gaming Services tutorial series part 4: Google Play Games login

Thanks for the detailed tutorial. Definitely can see the effort involved, great job!

As login is handled through Essential Kit’s Game Services too, and we don’t use Google Play Game Services internally, I’m adding this note in case anyone here is using Essential Kit’s Game Services instead of the Google Play Game Services plugin for Unity. Here are the steps:

Setup

  1. Open Essential Kit Settings → Game Services → Android Properties
  2. Fill in App Id in Play Services Application Id
  3. Fill in OAuth Client Id (created for Web/Game Server) in Server Client Id

Fetching Auth Code

  1. Call GameServices.Authenticate
  2. On successful login callback, Call GameServices.LoadServerCredentials with required optional scopes.
  3. Access Server Auth Code from LoadServerCredentials callback. By default we include the refresh token and it’s configurable from settings if you don’t need it.

No other additional steps required. We handle all the dependency resolution automatically and same code works for iOS.

Additional References & FAQ
How many SHA fingerprints I need to add for successful authentication?
How to get each environment’s SHA?
Authenticate APK’s built in different environments(Debug/Release/Production(PlayStore builds))

2 Likes