Type Library Revision Release 2024.3703 Keywords google, google play games services, achievements, leaderboards Platforms Android Sample GitHub
This plugin enables access to Google Play Games Services API, such as achievements, leaderboards and snapshots(Saved Games).
Make sure you check out Google's Setup Guide to get before getting started with the plugin.
If you encounter
Also, in order to use snapshots you must add Drive API within the Google Play Developer Console.
If you deploy the application locally using Copy to device
,
Initialize is now required and will attempt to sign in the player automatically
isConnected is now async and has a callback. use isConnected to check if a player is automatically connected via init or manually login functions
isAuthenticated is actually the same but should be noted that isAuthenticated only applies for logins in via gpgs.login(). This is important for Snapshots which is needed to use gpgs.login() for requesting Drive API access.
There is a new useDrive
param which is need for Snapshots. It is import to note that the Drive scope is not added by default and you must set the useDrive
param to true
.
local gpgs= require( "plugin.gpgs.v3" )
To use this plugin, add an entry into the plugins
table of build.settings
. When added, the build server will integrate the plugin during the build phase.
settings = { plugins = { ["plugin.gpgs.v3"] = { publisherId = "com.solar2d", }, }, }
Additionally, you must specify the android
table of build.settings
as the googlePlayGamesAppId
key:
settings = { android = { googlePlayGamesAppId = "YOUR_APPLICATION_ID", }, }
The plugin is divided into API nodes for better organization.
This is the base API node for the plugin. It manages connection to the Google's servers, authentication and general SDK tasks.