GodotAndroidPlugin
This is the main Godot Plugin class exposing the interfaces to use with Godot. In this class you will find all the methods that can be called in your game via GDScript.
Functions
Displays a screen where the user can see a comparison of their own profile against another player's profile.
Displays a screen where the user can see a comparison of their own profile against another player's profile.
Deletes the given snapshot. This will delete the data of the snapshot locally and on the server.
Use this method to increment a given achievement in the given amount. For normal achievements, use the unlockAchievement method instead.
Increments an event specified by eventId by the given number of steps.
This method initializes the Play Games SDK. It should be called right after checking that the plugin is loaded into Godot, for example:
Use this method to check if the user is already authenticated. If the user is authenticated, a popup will be shown on screen.
Call this method and subscribe to the emitted signal to receive the list of the game achievements in JSON format. The JSON received from the com.jacobibanez.plugin.android.godotplaygameservices.signals.AchievementsSignals.achievementsLoaded signal contains a representation of the com.google.android.gms.games.achievement.Achievement class.
Call this method and subscribe to the emitted signal to receive all leaderboards for the game in JSON format. The JSON received from the com.jacobibanez.plugin.android.godotplaygameservices.signals.LeaderboardSignals.allLeaderboardsLoaded signal, contains a list of elements representing the com.google.android.gms.games.leaderboard.Leaderboard class.
Call this method and subscribe to the emitted signal to receive the currently signed in player in JSON format.The JSON received from the com.jacobibanez.plugin.android.godotplaygameservices.signals.PlayerSignals.currentPlayerLoaded signal, contains a representation of the com.google.android.gms.games.Player class.
Loads a list of events for the currently signed-in player. This method emits the com.jacobibanez.plugin.android.godotplaygameservices.signals.EventsSignals.eventsLoaded signal.
Loads a specific list of events for the currently signed-in player. This method emits the com.jacobibanez.plugin.android.godotplaygameservices.signals.EventsSignals.eventsLoadedByIds signal.
Call this method and subscribe to the emitted signal to receive the list of friends for the currently signed in player in JSON format. The JSON received from the com.jacobibanez.plugin.android.godotplaygameservices.signals.PlayerSignals.friendsLoaded signal, contains a list of elements representing the com.google.android.gms.games.Player class.
Loads game data from the Google Cloud. This method emits the com.jacobibanez.plugin.android.godotplaygameservices.signals.SnapshotSignals.gameLoaded signal.
Call this method and subscribe to the emitted signal to receive the specific leaderboard in JSON format. The JSON received from the com.jacobibanez.plugin.android.godotplaygameservices.signals.LeaderboardSignals.leaderboardLoaded signal, contains a representation of the com.google.android.gms.games.leaderboard.Leaderboard class.
Call this method and subscribe to the emitted signal to receive the selected leaderboard and an array of scores for that leaderboard, centered in the currently signed in player. The JSON received from the com.jacobibanez.plugin.android.godotplaygameservices.signals.LeaderboardSignals.playerCenteredScoresLoaded signal, contains a representation of the com.google.android.gms.games.LeaderboardsClient.LeaderboardScores class.
Call this method and subscribe to the emitted signal to receive the score of the currently signed in player for the given leaderboard, time span, and collection in JSON format. The JSON received from the com.jacobibanez.plugin.android.godotplaygameservices.signals.LeaderboardSignals.scoreLoaded signal contains a representation of the com.google.android.gms.games.leaderboard.LeaderboardScore class.
Loads the list of com.google.android.gms.games.snapshot.SnapshotMetadata for the current signed in Player. This method emits the com.jacobibanez.plugin.android.godotplaygameservices.signals.SnapshotSignals.snapshotsLoaded signal.
Call this method and subscribe to the emitted signal to receive the selected leaderboard and an array of the top scores for that leaderboard. The JSON received from the com.jacobibanez.plugin.android.godotplaygameservices.signals.LeaderboardSignals.playerCenteredScoresLoaded signal, contains a representation of the com.google.android.gms.games.LeaderboardsClient.LeaderboardScores class.
Requests server-side access to Play Games Services for the currently signed-in player.
Use this method to reveal a hidden achievement to the current signed player. If the achievement is already unlocked, this method will have no effect.
Displays a screen where the user can search for players. If the user selects a player, then the com.jacobibanez.plugin.android.godotplaygameservices.signals.PlayerSignals.playerSearched signal will be emitted, returning the selected player.
Use this method to open a new window with the achievements of the game, and the progress of the player to unlock those achievements.
Shows a new screen with all the leaderboards for the game.
Shows a new screen for a specific leaderboard.
Shows a specific leaderboard for a given span of time.
Shows a specific leaderboard for a given span of time and a specific type of collection.
Opens a new window to display the saved games for the current player. If you select one of the saved games, the com.jacobibanez.plugin.android.godotplaygameservices.signals.SnapshotSignals.gameLoaded signal will be emitted.
Submits the score to the leaderboard for the currently signed-in player. The score is ignored if it is worse (as defined by the leaderboard configuration) than a previously submitted score for the same player.
Immediately unlocks the given achievement for the signed in player. If the achievement is secret, it will be revealed to the player.