Release Notes: (1.3.0)
  • iOS arm64 architecture support added.
  • Updated to Google Play Games Services iOS SDK v3.0.
  • Updated to Google Play Services Android SDK v6.1.11.

Integration Guide - Google Play Game Services Plugin

Platforms: Android & iOS
Plugin version: 1.3.0
Android SDK version: 6.1.11
iOS SDK version: 3.0

Generally you don't have to dive into the documentation from Facebook, simply follow a few steps below to get the plugin integrated in your App in minutes:

PREPARATION:

· >>> If you intend to publish scores or achievements to Google Play Game Services, please set up your game at Google Play Developer Console before integrating. For more information, check out the Google Developer Docs.

· >>> The plugin requires the "Saved Games" setting of your App to be turned on in Google Play Developer Console, and the "Drive API" needs to be enabled in your Google+ services APIs. [How-To]

[1] Import the GoogleGPGS[Android|IOS|Universal].unitypackage file to your unity project;

[2] Follow the instructions below to configure the plugin.

· >>> For Android platform, click on the menu item of Unity top menu bar: NeatPlug -> GoogleGPGS -> Patch Android Configuration. This is for generating a valid AndroidManifest.xml or patching the existing file with GoogleGPGS support.


· >>> For iOS platform, click on the menu item of Unity top menu bar: NeatPlug -> GoogleGPGS -> Patch iOS Configuration. This is for automatically adding iOS SDK frameworks, libraries or patching the Info.plist file (if needed) as long as the Xcode project is generated by Unity.

[3] Find GoogleGPGSAgent Prefab and GoogleGPGSListener Prefab in Assets/Plugins/NeatPlug/Multiplayer/GoogleGPGS/Prefabs/, open the first scene of your game, drag & drop those two prefabs into the scene.

[4] Okay, the integration is done here. Now set up your Google Play Game Services by filling in a few properties of the GoogleGPGSAgent gameObject which you just dropped in the Hierarchy window. To do this, simply select that gameObject, and look at its properties in the Inspector window, you need to fill in:

   · App Id [Android|IOS] - Your App ID for Android or IOS, this can be obtained from Google Play Developer Console.

   · Show Welcome Balloon - Check this if you want the plugin to show a welcome balloon automatically when user logs in.

   · Welcome Balloon Placement - Select the placement for the welcome balloon, only effective when Show Welcome Balloon is checked.

   · Multiplayer Mode - Check this if you want to enable multiplayer mode, in which multiplayer data transfers can be performed.

   · Auto Handle Invitations - Check this if you want the plugin to automatically handle game invitations from other players.

   · Debug Mode - Check this if you want the plugin to print detailed debug information in the console.


   · Sample Scene - A sample scene with sample code can be found in Assets/Scenes/NeatPlug/Multiplayer/GoogleGPGS/.

[5] After you supply above info that the plugin needs, submitting scores and achievements / sending and receiving multiplayer messages can be as easy as a single line of code. You can call below methods to do so.

 

   Exposed methods:

   · GoogleGPGS.Instance().Init(...) - Required if you don't apply "App Id" for GoogleGPGSAgent.

   · GoogleGPGS.Instance().Login() - Log the user in, this will open a Google+ authentication window if user is not logged in.

   · GoogleGPGS.Instance().Logout() - Log the user out, and invalidate the cached session.

   · GoogleGPGS.Instance().IsUserLoggedIn() - Find if the user has logged in.

   · GoogleGPGS.Instance().LoadLeaderboardMetadata(...) - Load the leaderboard meta data, i.e. DisplayName, IconImageURL, ScoreOrder etc...

   · GoogleGPGS.Instance().LoadLeaderboardScores(...) - Load the top page of scores for a given leaderboard

   · GoogleGPGS.Instance().LoadAchievements() - Load the achievements information.

   · GoogleGPGS.Instance().ShowAllLeaderboards() - Show all leaderboards.

   · GoogleGPGS.Instance().ShowLeaderboard(...) - Show a specific leaderboard.

   · GoogleGPGS.Instance().ShowAchievements() - Show Achievements window.

   · GoogleGPGS.Instance().SubmitScore(...) - Submit a score to a leaderboard for the currently signed in player.

   · GoogleGPGS.Instance().UnlockAchievement(...) - Unlock an achievement for the currently signed in player.

   · GoogleGPGS.Instance().IncrementAchievement(...) - Increments an achievement by the given number of steps.

   · GoogleGPGS.Instance().ShowInvitationInbox() - Show the Invitation Inbox.

   · GoogleGPGS.Instance().StartQuickGame() - Start a quick game.

   · GoogleGPGS.Instance().InvitePlayersToRoom() - Invite players to room.

   · GoogleGPGS.Instance().LeaveRoom() - Leave a room.

   · GoogleGPGS.Instance().BroadcastReliableMessage(...) - Broadcast a reliable message to a room.

   · GoogleGPGS.Instance().SendReliableMessage(...) - Send a reliable message to a recipient.

   · GoogleGPGS.Instance().BroadcastUnreliableMessage(...) - Broadcast an unreliable message to a room.

   · GoogleGPGS.Instance().SendUnreliableMessage(...) - Send an unreliable message to a recipient.

   · GoogleGPGS.Instance().GetRoom(...) - Get the information of a connected room.

   · GoogleGPGS.Instance().GetSelfParticipantId(...) - Get self participant ID of the user.

   · GoogleGPGS.Instance().SaveDataToCloud(...) - Save user specific App state data to the cloud.

   · GoogleGPGS.Instance().LoadDataFromCloud(...) - Load user specific App state data from the cloud.

   · GoogleGPGS.Instance().ResolveCloudSaveConflict(...) - Resolve the Cloud Save conflict.

  There are other useful public methods that GoogleGPGS provides, to use them, simply call GoogleGPGS.Instance().methodName().
Show All   
public void Init(string appId, ...)
/**
 * Initialize the environment.
 * 
 * @param appId
 *            string - The AppID got from Google Play dev console.
 * 
 * @param welcomeBalloonPlacement
 *            GoogleUILayout - The placement for welcome message balloon.
 * 
 * @param showWelcomeBalloon
 *            bool - True for showing the welcome balloon, false for not.
 * 
 * @param multiplayerMode
 *            bool - True for enabling multiplayer mode, false for not.
 *            
 * @param debugMode
 *            bool - True for debug mode on, false for not.	 
 * 	
 */
public void Init(string appId, GoogleUILayout welcomeBalloonPlacement, 
	                 bool showWelcomeBalloon, bool multiplayerMode, 
	                 bool autoHandleInvitations, bool debugMode)
public void Login()
/**
 * Login the user.	
 * 
 * This will show up a Google Play Services login box if there's no active session. 
 */
public void Login()
public void Logout()
/**
 * Log out the user.
 */
public void Logout()
public void LoadLeaderboardMetadata(string leaderboardId)
/**
 * Load the metadata of specified leaderboard.
 *
 * @param leaderboardId
 *          string - The ID of the leaderboard.
 */
public void LoadLeaderboardMetadata(string leaderboardId)
public void LoadLeaderboardScores(string leaderboardId, ... )
/**
 * Asynchronously load the top page of scores for a given leaderboard.
 *
 * @param leaderboardId
 *          string - The ID of the leaderboard.
 * 
 * @param span
 *          GoogleLeaderboardTimeSpan - Time span to retrieve data for. 
 *                                      Valid values: {TIME_SPAN_DAILY, TIME_SPAN_WEEKLY, TIME_SPAN_ALL_TIME}.
 * 
 * @param maxResult
 *          int - The maximum number of scores to fetch per page. Must be between 1 and 25.
 * 
 * @param leaderboardCollection
 *          GoogleLeaderboardCollection - The leaderboard collection to retrieve scores for. 
 *                                       Valid values: {COLLECTION_PUBLIC, COLLECTION_SOCIAL}.
 * 
 * @param forceReload
 *          bool - If true, this call will clear any locally cached data and attempt to fetch the latest data 
 *                 from the server. This would commonly be used for something like a user-initiated refresh. 
 *                 Normally, this should be set to false to gain advantages of data caching.
 */
public void LoadLeaderboardScores(string leaderboardId, GoogleLeaderboardTimeSpan span, 
		              int maxResults, GoogleLeaderboardCollection leaderboardCollection, 
		              bool forceReload)
public void LoadAchievements()
/**
 * Asynchronously load achievement data for the currently signed in player.
 */
public void LoadAchievements()
public void ShowAllLeaderboards()
/**
 * Show all leaderboards.
 */
public void ShowAllLeaderboards()
public void ShowLeaderboard(string leaderboardId)
/**
 * Show a specific leaderboard.
 * 
 * @param leaderboardId
 *          string - The ID of the leaderboard.
 */
public void ShowLeaderboard(string leaderboardId)
public void ShowAchievements()
/**
 * Show achievements.
 */
public void ShowAchievements()
public bool IsUserLoggedIn()
/**
 * Get user login status.
 * 
 * @return bool - True for user is logged in, false for not.
 */
public bool IsUserLoggedIn()
public void SubmitScore(string leaderboardId, long score)
/**
 * Submit a score to a 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.
 * 
 * Your App will be notified with event - GoogleGPGSListener::OnScoreSubmitted() if 
 * the score submission is successful, or GoolgeGPGSListener::OnFailedToSubmitScore()
 * if the action failed.
 *
 * @param leaderboardId
 *           string - The leaderboard to submit the score to.
 * 
 * @param score
 *           long - The raw score value.
 */
public void SubmitScore(string leaderboardId, long score)
public void UnlockAchievement(string achievementId)
/**
 * Unlock an achievement for the currently signed in player. 
 * If the achievement is hidden this will reveal it to the player. 
 * 
 * Your App will be notified with event - GoogleGPGSListener::OnAchievementUnlocked() if 
 * the score submission is successful, or GoolgeGPGSListener::OnFailedToUnlockAchievement()
 * if the action failed.
 * 
 * @param achievementId
 *            string - The ID of the achievement to unlock.
 */
public void UnlockAchievement(string achievementId)
public void IncrementAchievement(string achievementId)
/**
 * Increments an achievement by the given number of steps. 
 * The achievement must be an incremental achievement. 
 * Once an achievement reaches at least the maximum number of steps, 
 * it will be unlocked automatically. 
 * Any further increments will be ignored. 
 * 
 * Your App will be notified with event - GoogleGPGSListener::OnAchievementIncremented() if 
 * the score submission is successful, or GoolgeGPGSListener::OnFailedToIncrementAchievement()
 * if the action failed.
 * 
 * @param achievementId
 *            string - The ID of the achievement to increment.
 * 
 * @param numSteps
 *            int - The number of steps to increment by. Must be greater than 0.
 */
public void IncrementAchievement(string achievementId)
public void AcceptInvitation(string invitationId)
/**
 * Manually accept an invitation.
 * 
 * NOTE: You need to call this function only when the "Auto Handle Invitations" checkbox on 
 * GoogleGPGSAgent is unchecked. This function should be called in the "Accept" button logic
 * in your custom invitation prompt UI.
 * 
 * @param invitationId
 *            string - The invitation ID. (Can be got from OnInvitationReceived event).
 */
public void AcceptInvitation(string invitationId)
public void DeclineInvitation(string invitationId)
/**
 * Manually decline an invitation.
 * 
 * NOTE: You need to call this function only when the "Auto Handle Invitations" checkbox on 
 * GoogleGPGSAgent is unchecked. This function should be called in the "Decline" button logic
 * in your custom invitation prompt UI.
 * 
 * @param invitationId
 *            string - The invitation ID. (Can be got from OnInvitationReceived event).
 */
public void DeclineInvitation(string invitationId)
public void ShowInvitationInbox()
/**
 * Show invitation inbox.
 */
public void ShowInvitationInbox()
public void StartQuickGame(int minAutoMatchPlayers, int maxAutoMatchPlayers)
/**
 * Start a quick game.
 * 
 * @param minAutoMatchPlayers
 *           int - The minimum number of players to auto match.
 * 
 * @param maxAutoMatchPlayers
 *           int - The maximum number of players to auto match.
 */
public void StartQuickGame(int minAutoMatchPlayers, int maxAutoMatchPlayers)
public void InvitePlayersToRoom(int minOtherPlayers, int maxOtherPlayers)
/**
 * Invite players to room.
 * 
 * @param minOtherPlayers
 *           int - The minimum number of players to invite.
 * 
 * @param maxOtherPlayers
 *           int - The maximum number of players to invite.
 */
public void InvitePlayersToRoom(int minOtherPlayers, int maxOtherPlayers)
public void LeaveRoom(string roomId)
/**
 * Leave a room.
 * 
 * @param roomId
 *           string - The room ID.
 * 
 */
public void LeaveRoom(string roomId)
public void BroadcastReliableMessage(string roomId, byte[] messageData)
/**
 * Broadcast a reliable message to a room.
 * 
 * @param roomId
 *           string - The room ID.
 * 
 * @param messageData
 *           byte[] - The message data to be sent.
 */
public void BroadcastReliableMessage(string roomId, byte[] messageData)
public void SendReliableMessage(string roomId, string recipientParticipantId, byte[] messageData)
/**
 * Send a reliable message to a recipient.
 * 
 * @param roomId
 *           string - The room ID.
 * 
 * @param recipientParticipantId
 *           string - The recipient's participant ID.
 * 
 * @param messageData
 *           byte[] - The message data to be sent.
 */
public void SendReliableMessage(string roomId, string recipientParticipantId, byte[] messageData)
public void BroadcastUnreliableMessage(string roomId, byte[] messageData)
/**
 * Broadcast an unreliable message to a room.
 * 
 * @param roomId
 *           string - The room ID.
 * 
 * @param messageData
 *           byte[] - The message data to be sent.
 */
public void BroadcastUnreliableMessage(string roomId, byte[] messageData)
public void SendUnreliableMessage(string roomId, string recipientParticipantId, byte[] messageData)
/**
 * Send an unreliable message to a recipient.
 * 
 * @param roomId
 *           string - The room ID.
 * 
 * @param recipientParticipantId
 *           string - The recipient's participant ID.
 * 
 * @param messageData
 *           byte[] - The message data to be sent.
 */
public void SendUnreliableMessage(string roomId, string recipientParticipantId, byte[] messageData)
public void SendUnreliableMessage(string roomId, List<string> recipientParticipantIds, byte[] messageData)
/**
 * Send an unreliable message to a group of recipients. 
 * 
 * @param roomId
 *           string - The room ID.
 * 
 * @param recipientParticipantIds
 *           string - A group of recipients.
 * 
 * @param messageData
 *           byte[] - The message data to be sent.	
 */
public void SendUnreliableMessage(string roomId, List<string> recipientParticipantIds, byte[] messageData)
public GoogleRoom GetRoom(string roomId)
/**
 * Get a connected room information.
 * 
 * @param roomId
 *            string - The room ID. If null, current connected room will be queried.
 * 
 * @return GoogleRoom - The room object, if null, no room is found.
 */
public GoogleRoom GetRoom(string roomId)
public GoogleRoom GetCurrentRoom()
/**
 * Get current connected room information. 
 * 
 * @return GoogleRoom - The current connected room, if null, no room is connected currently.
 */
public GoogleRoom GetCurrentRoom()
public string GetSelfParticipantId(string roomId = null)
/**
 * Get self participant ID.
 * 
 * @param roomId
 *         string - The room ID.
 * 
 * @return string - Self participant ID.
 */
public string GetSelfParticipantId(string roomId = null)
public string SaveDataToCloud(int stateKey, byte[] data, bool offlineSave)
/**
 * Save user specific App state data to the cloud.
 * 
 * The result will be delivered via GoogleGPGSListener::OnDataSavedToCloud on 
 * success or GoogleGPGSListener::OnFailedToSaveDataToCloud on failure.
 * 
 * @param stateKey
 *          int - The key of the state data.
 * 
 * @param data
 *          byte[] - The data to be saved to the cloud.
 *                   (The data on the cloud will be overwritten if exists).
 * 
 * @param bool
 *          offlineSave - True for enabling storing data locally when there is 
 *                        no internet connection and then retry when network 
 *                        becomes available. False for not.
 */
public string SaveDataToCloud(int stateKey, byte[] data, bool offlineSave)
public string LoadDataFromCloud(int stateKey)
/**
 * Load user specific App state data from the cloud.
 * 
 * The result will be delivered via GoogleGPGSListener::OnDataLoadedFromCloud on 
 * success or GoogleGPGSListener::OnFailedToLoadDataFromCloud on failure.
 * 
 * NOTE: You may need to resolve the conflict of the result if there're any 
 * (in case result.hasConflict is true).
 * ResolveCloudSaveConflict() is what you need to call to resolve the conflict.
 * 
 * @param stateKey
 *          int - The key of the state data.
 */
public string LoadDataFromCloud(int stateKey)
public string ResolveCloudSaveConflict(int stateKey, string resolvedVersion, byte[] data)
/**
 * Resolve the Cloud Save conflict, by saving a new data to the cloud.
 * 
 * The result will be delivered via GoogleGPGSListener::OnCloudSaveConflictResolved on 
 * success or GoogleGPGSListener::OnFailedToResolveCloudSaveConflict on failure.
 * 
 * @param stateKey
 *          int - The key of the state data.
 * 
 * @param resolvedVersion
 *          string - The resolvedVersion of the conflict, which you can get from 
 *                   GoogleGPGSListener::OnDataLoadedFromCloud callback.
 * 
 * @param data
 *          byte[] - The new data you want to set for the specified state key.
 */
public string ResolveCloudSaveConflict(int stateKey, string resolvedVersion, byte[] data)

[6] For advanced users who need to handle Google Play Game Services events, Read this:

  Follow the instructions to handle events:

  · Select the dropped GoogleGPGSListener gameObject, locate the GoogleGPGSListener.cs script, open it and make some modifications.

  These callbacks are exposed in the script, you can supply your own implementations in them.
Show All   
void OnUserLoggedIn() { ... }
/**
 * Fired when the user successfully logged in.
 */
void OnUserLoggedIn()
{
    /// Your code here...   
}
void OnUserFailedToLogIn() { ... }
/**
 * Fired when the user failed to login.
 * 
 * @param err
 *          string - The error string
 */
void OnUserFailedToLogIn()
{
    /// Your code here...   
}
void OnUserLoggedOut() { ... }
/**
 * Fired when the user is logged out.
 */
void OnUserLoggedOut()
{
    /// Your code here...   
}
void OnUserInfoArrived(GooglePlayerInfo userInfo) { ... }
/**
 * Fired when the user info data arrived.	 
 * 
 * @param userInfo
 *         GooglePlayerInfo - An object containing the user info. 
 */
void OnUserInfoArrived(GooglePlayerInfo userInfo)
{
    /// Your code here...   
}
void OnFailedToGetUserInfo(string err) { ... }
/**
 * Fired when failed to get user info.
 * 
 * @param err
 *         string - The error string.
 */
void OnFailedToGetUserInfo(string err)
{
    /// Your code here...   
}
void OnLeaderboardMetadataLoaded(string leaderboardId, GoogleLeaderboardInfo leaderboardInfo) { ... }
/**
 * Fired when the metadata of a leaderboard is successfully loaded.
 * 
 * @param leaderboardId
 *             string - The ID of the leaderboard.
 * 
 * @param leaderboardInfo
 *             GoogleLeaderboardInfo - An object containing the leaderboard information.
 */
void OnLeaderboardMetadataLoaded(string leaderboardId, GoogleLeaderboardInfo leaderboardInfo)
{
    /// Your code here...   
}
void OnFailedToLoadLeaderboardMetadata(string leaderboardId, string err) { ... }
/**
 * Fired when failed to load the metadata for a given leaderboard.
 * 
 * @param leaderboardId
 *             string - The ID of the leaderboard.
 * 
 * @param err
 *         string - The error string.
 */
void OnFailedToLoadLeaderboardMetadata(string leaderboardId, string err)
{
    /// Your code here...   
}
void OnLeaderboardScoresLoaded(string leaderboardId, List<GoogleScoreInfo> scores) { ... }
/**
 * Fired when the scores data for a given leaderboard is successfully loaded.
 * 
 * @param leaderboardId
 *             string - The ID of the leaderboard.
 * 
 * @param scores
 *           List<GoogleScoreInfo> - The scores data.	 
 */
void OnLeaderboardScoresLoaded(string leaderboardId, List<GoogleScoreInfo> scores)
{
    /// Your code here...   
}
void OnFailedToLoadLeaderboardScores(string leaderboardId, string err) { ... }
/**
 * Fired when failed to load the scores for a given leaderboard.
 * 
 * @param leaderboardId
 *             string - The ID of the leaderboard.
 * 
 *  @param err
 *          string - The error string
 */
void OnFailedToLoadLeaderboardScores(string leaderboardId, string err)
{
    /// Your code here...   
}
void OnAchievementsLoaded(List<GoogleAchievementInfo> achievements) { ... }
/**
 * Fired when achievements data is successfully loaded.
 * 
 * @param achievements
 *            List<GoogleAchievementInfo> - The achievements data.
 */
void OnAchievementsLoaded(List<GoogleAchievementInfo> achievements)
{
    /// Your code here...   
}
void OnFailedToLoadAchievements(string err) { ... }
/**
 * Fired when failed to load the achievements data.
 * 
 * @param err
 *         string - The error message.
 */
void OnFailedToLoadAchievements(string err)
{
    /// Your code here...   
}
void OnLeaderboardsDismissed() { ... }
/**
 * Fired when the leaderboards dismissed.	
 */
void OnLeaderboardsDismissed()
{
    /// Your code here...   
}
void OnFailedToShowLeaderboards(string err) { ... }
/**
 * Fired when failed to show the leaderboards.
 * 
 * @param err
 *         string - The error message.
 */
void OnFailedToShowLeaderboards(string err)
{
    /// Your code here...   
}
void OnAchievementsDismissed() { ... }
/**
 * Fired when achievements dismissed.
 */
void OnAchievementsDismissed()
{
    /// Your code here...   
}
void OnFailedToShowAchievements(string err) { ... }
/**
 * Fired when failed to show the achievements.
 * 
 * @param err
 *         string - The error message.
 */
void OnFailedToShowAchievements(string err)
{
    /// Your code here...   
}
void OnScoreSubmitted(string leaderboardId) { ... }
/**
 * Fired when a score is successfully submitted.
 * 
 * @param leaderboardId
 *          string - The leadearboard to submit the score to.
 */
void OnScoreSubmitted(string leaderboardId)
{
    /// Your code here...   
}
void OnFailedToSubmitScore(string leaderboardId, string err) { ... }
/**
 * Fired when failed to submit a score.
 * 
 * @param leaderboardId
 *          string - The leadearboard to submit the score to.
 * 
 * @param err
 *          string - The error string.
 */
void OnFailedToSubmitScore(string leaderboardId, string err)
{
    /// Your code here...   
}
void OnAchievementUnlocked(string achievementId) { ... }
/**
 * Fired when an achievement is successfully unlocked. 
 * 
 * @param achievementId
 *         string - The unlocked achievement. 
 */
void OnAchievementUnlocked(string achievementId)
{
    /// Your code here...   
}
void OnFailedToUnlockAchievement(string achievementId, string err) { ... }
/**
 * Fired when failed to unlock an achievement.
 * 
 * @param achievementId
 *         string - The achievementID.
 * 
 * @param err
 *         string - The error string.
 */
void OnFailedToUnlockAchievement(string achievementId, string err)
{
    /// Your code here...   
}
void OnAchievementIncremented(string achievementId) { ... }
/**
 * Fired when an achievement is successfully incremented. 
 * 
 * @param achievementId
 *         string - The unlocked achievement. 
 */
void OnAchievementIncremented(string achievementId)
{
    /// Your code here...   
}
void OnFailedToIncrementAchievement(string achievementId, string err) { ... }
/**
 * Fired when failed to increment an achievement.
 * 
 * @param achievementId
 *         string - The achievementID.
 * 
 * @param err
 *         string - The error string.
 */
void OnFailedToIncrementAchievement(string achievementId, string err)
{
    /// Your code here...   
}
void OnInvitationReceived(string invitationId, string inviterName, string inviterParticipantId) { ... }
/**
 * Fired when an invitation from peer is received.
 * 
 * NOTE: You don't need to handle this event if you checked "Auto Handle Invitations"
 * on GoogleGPGSAgent, with "Auto Handle Invitations" option checked, a native dialog 
 * will pop up prompting the user if an invitation should be accepted when an invitation
 * is received. This event is only for developers who want to handle invitations on their
 * own, or present a custom prompt UI, a further AcceptInvitation() call will be needed
 * if the user taps on "Accept" button.
 * 
 * @param invitationId
 *            string - The invitation ID that can be used to call AcceptInvitation().
 * 
 * @param inviterName
 *            string - The inviter's name that can be displayed on the prompt UI.
 * 
 * @param inviterParticipantId
 *            string - The inviter's participant ID.
 * 	
 */
void OnInvitationReceived(string invitationId, string inviterName, string inviterParticipantId)
{
    /// Your code here...   
}
void OnInvitationAccepted(string inviterParticipantId) { ... }
/**
 * Fired when an invitation from peer is accepted.
 * 
 * @param inviterParticipantId
 *            string - The participant ID of the inviter.
 */
void OnInvitationAccepted(string inviterParticipantId)
{
    /// Your code here...   
}
void OnInvitationDeclined(string inviterParticipantId) { ... }
/**
 * Fired when an invitation from peer is declined.
 * 
 * @param inviterParticipantId
 *            string - The participant ID of the inviter.
 */
void OnInvitationDeclined(string inviterParticipantId)
{
    /// Your code here...   
}
void OnInvitationInboxDismissed() { ... }
/**
 * Fired when the invitation inbox is dismissed.
 */
void OnInvitationInboxDismissed()
{
    /// Your code here...   
}
void OnFailedToShowInvitationInbox(string err) { ... }
/**
 * Fired when failed to show the invitation inbox.
 * 
 * @param err
 *         string - The error message.
 */
void OnFailedToShowInvitationInbox(string err)
{
    /// Your code here...   
}
void OnQuickGameStarted() { ... }
/**
 * Fired when a quick game is started.
 */
void OnQuickGameStarted()
{
    /// Your code here...   
}
void OnFailedToStartQuickGame(string err) { ... }
/**
 * Fired when failed to start a quick game.
 * 
 * @param err
 *         string - The error message.
 */
void OnFailedToStartQuickGame(string err)
{
    /// Your code here...   
}
void OnPlayersInvitedToRoom(List<string> invitees) { ... }
/**
 * Fired when an invite is successfully sent to players.
 * 
 * @param invitees
 *          List<string> - A list of players that are invited.
 */
void OnPlayersInvitedToRoom(List<string> invitees)
{
    /// Your code here...   
}
void OnFailedToInvitePlayersToRoom(string err) { ... }
/**
 * Fired when failed to invite players to a room.
 * 
 * @param err
 *         string - The error message.
 */
void OnFailedToInvitePlayersToRoom(string err)
{
    /// Your code here...   
}
void OnConnectedToRoom(string roomId, List<GoogleParticipant> participants) { ... }
/**
 * Fired when the player is connected to a room.
 * 
 * @param roomId
 *          string - The ID of the room.
 * 
 * @param participants
 *          List<GoogleParticipant> - The participants currently in the room.
 */
void OnConnectedToRoom(string roomId, List<GoogleParticipant> participants)
{
    /// Your code here...   
}
void OnDisconnectedFromRoom(string roomId, List<GoogleParticipant> participants) { ... }
/**
 * Fired when the player is disconnected from a room.
 * 
 * @param roomId
 *          string - The ID of the room.
 * 
 * @param participants
 *          List - The participants currently in the room.
 */
void OnDisconnectedFromRoom(string roomId, List<GoogleParticipant> participants)
{
    /// Your code here...   
}
void OnPeerDeclined(string roomId, List<GoogleParticipant> participants, List<string> peers) { ... }
/**
 * Fired when your invite is declined by peers.
 * 
 * @param roomId
 *          string - The ID of the room.
 * 
 * @param participants
 *          List<GoogleParticipant> - The participants currently in the room.
 * 
 * @param peers
 *          List<string> - The peers that declined your invite.
 */
void OnPeerDeclined(string roomId, List<GoogleParticipant> participants, List<string> peers)
{
    /// Your code here...   
}
void OnPeerInvitedToRoom(string roomId, List<GoogleParticipant> participants, List<string> peers) { ... }
/**
 * Fired when your invite is declined by peers.
 * 
 * @param roomId
 *          string - The ID of the room.
 * 
 * @param participants
 *          List<GoogleParticipant> - The participants currently in the room.
 * 
 * @param peers
 *          List<string> - The peers that declined your invite.
 */
void OnPeerInvitedToRoom(string roomId, List<GoogleParticipant> participants, List<string> peers)
{
    /// Your code here...   
}
void OnPeerJoined(string roomId, List<GoogleParticipant> participants, List<string> peers) { ... }
/**
 * Fired when peers joined the room.
 * 
 * @param roomId
 *          string - The ID of the room.
 * 
 * @param participants
 *          List - The participants currently in the room.
 * 
 * @param peers
 *          List - The peers that joined the room.
 */
void OnPeerJoined(string roomId, List<GoogleParticipant> participants, List<string> peers)
{
    /// Your code here...   
}
void OnPeerLeft(string roomId, List<GoogleParticipant> participants, List<string> peers) { ... }
/**
 * Fired when peers left the room.
 * 
 * @param roomId
 *          string - The ID of the room.
 * 
 * @param participants
 *          List - The participants currently in the room.
 * 
 * @param peers
 *          List - The peers that left the room.
 */
void OnPeerLeft(string roomId, List<GoogleParticipant> participants, List<string> peers)
{
    /// Your code here...   
}
void OnPeersConnected(string roomId, List<GoogleParticipant> participants, List<string> peers) { ... }
/**
 * Fired when peers connected to the room.
 * 
 * @param roomId
 *          string - The ID of the room.
 * 
 * @param participants
 *          List - The participants currently in the room.
 * 
 * @param peers
 *          List - The peers that connected to the room.
 */
void OnPeersConnected(string roomId, List<GoogleParticipant> participants, List<string> peers)
{
    /// Your code here...   
}
void OnPeersDisconnected(string roomId, List<GoogleParticipant> participants, List<string> peers) { ... }
/**
 * Fired when peers disconnected to the room.
 * 
 * @param roomId
 *          string - The ID of the room.
 * 
 * @param participants
 *          List - The participants currently in the room.
 * 
 * @param peers
 *          List - The peers that disconnected to the room.
 */
void OnPeersDisconnected(string roomId, List<GoogleParticipant> participants, List<string> peers)
{
    /// Your code here...   
}
void OnP2PConnected(string peerParticipantId) { ... }
/**
 * Fired when a P2P peer is connected.
 * 
 * @param peerParticipantId
 *               string - The participant ID of the peer.
 */
void OnP2PConnected(string peerParticipantId)
{
    /// Your code here...   
}
void OnP2PDisconnected(string peerParticipantId) { ... }
/**
 * Fired when a P2P peer is disconnected.
 * 
 * @param peerParticipantId
 *               string - The participant ID of the peer.
 */
void OnP2PDisconnected(string peerParticipantId)
{
    /// Your code here...   
}
void OnRoomAutoMatching(string roomId, List<GoogleParticipant> participants) { ... }
/**
 * Fired when the room is automatching.
 * 
 * @param roomId
 *          string - The ID of the room.
 * 
 * @param participants
 *          List<GoogleParticipant> - The participants currently in the room.
 */
void OnRoomAutoMatching(string roomId, List<GoogleParticipant> participants)
{
    /// Your code here...   
}
void OnRoomConnecting(string roomId, List<GoogleParticipant> participants) { ... }
/**
 * Fired when the room is connecting.
 * 
 * @param roomId
 *          string - The ID of the room.
 * 
 * @param participants
 *          List<GoogleParticipant> - The participants currently in the room.
 */
void OnRoomConnecting(string roomId, List<GoogleParticipant> participants)
{
    /// Your code here...   
}
void OnGameReadyToStart() { ... }
/**
 * Fired when a game is ready to start.		 
 */
void OnGameReadyToStart()
{
    /// Your code here...   
}
void OnReliabeMessageBroadcasted(string roomId) { ... }
/**
 * Fired when a reliable message is broadcasted to a room.
 * 
 *  @param roomId
 *          string - The ID of the room.
 */
void OnReliabeMessageBroadcasted(string roomId)
{
    /// Your code here...   
}
void OnFailedToBroadcastReliableMessage(string roomId, string err) { ... }
/**
 * Fired when a reliable message is broadcasted to a room.
 * 
 * @param roomId
 *          string - The ID of the room.
 * 
 * @param err
 *         string - The error message.
 */
void OnFailedToBroadcastReliableMessage(string roomId, string err)
{
    /// Your code here...   
}
void OnReliableMessageSent(string recipientParticipantId) { ... }
/**
 * Fired when a reliable message is sent to a recipient.
 * 
 *  @param recipientParticipantId
 *          string - The participant ID of the recipient.
 */
void OnReliableMessageSent(string recipientParticipantId)
{
    /// Your code here...   
}
void OnFailedToSendReliableMessage(string recipientParticipantId, string err) { ... }
/**
 * Fired when failed to send a reliable message to a recipient.
 * 
 * @param recipientParticipantId
 *          string - The participant ID of the recipient.
 * 
 * @param err
 *         string - The error message.
 */
void OnFailedToSendReliableMessage(string recipientParticipantId, string err)
{
    /// Your code here...   
}
void OnUnreliableMessageBroadcasted(string roomId) { ... }
/**
 * Fired when an unreliable message is broadcasted to a room.
 * 
 *  @param roomId
 *          string - The ID of the room.
 */
void OnUnreliableMessageBroadcasted(string roomId)
{
    /// Your code here...   
}
void OnFailedToBroadcastUnreliableMessage(string roomId, string err) { ... }
/**
 * Fired when an unreliable message is broadcasted to a room.
 * 
 * @param roomId
 *          string - The ID of the room.
 * 
 * @param err
 *         string - The error message.
 */
void OnFailedToBroadcastUnreliableMessage(string roomId, string err)
{
    /// Your code here...   
}
void OnUnreliableMessageSent(List<string> recipientParticipantIds) { ... }
/**
 * Fired when an unreliable message is sent to a group of recipients.
 * 
 * @param recipientParticipantIds
 *          List<string> - The recipients.
 */
void OnUnreliableMessageSent(List<string> recipientParticipantIds)
{
    /// Your code here...   
}
void OnFailedToSendUnreliableMessage(List<string> recipientParticipantIds, string err) { ... }
/**
 * Fired when failed to send an unreliable message to a recipient.
 * 
 * @param recipientParticipantIds
 *          List<string> - The recipients.
 * 
 * @param err
 *          string - The error message.
 */
void OnFailedToSendUnreliableMessage(List<string> recipientParticipantIds, string err)
{
    /// Your code here...   
}
void OnMessageReceived(string senderParticipantId, byte[]messageData) { ... }
/**
 * Fired when a message is recieved.
 * 
 * @param senderParticipantId
 *          string - The participant ID of the sender.
 * 
 * @param messageData
 *          byte[] - The received message data.
 */
void OnMessageReceived(string senderParticipantId, byte[]messageData)
{
    /// Your code here...   
}
void OnDataSavedToCloud(int stateKey) { ... }
/**
 * Fired when data is successfully saved to the cloud.
 * 
 * @param stateKey
 *           int - The key of the state data.
 */
void OnDataSavedToCloud(int stateKey)
{
    /// Your code here...   
}
void OnFailedToSaveDataToCloud(int stateKey, string err) { ... }
/**
 * Fired when failed to save data to the cloud.
 * 
 * @param stateKey
 *          int - The key of the state data.
 * 
 * @param err
 *          string - The error message.
 */
void OnFailedToSaveDataToCloud(int stateKey, string err)
{
    /// Your code here...   
}
void OnDataLoadedFromCloud(int stateKey, CloudDataLoadedResult result) { ... }
/**
 * Fired when data is successfully loaded from the cloud.
 * 
 * @param stateKey
 *          int - The key of the state data.
 * 
 * @param dataLoadedResult
 *          CloudDataLoadedResult - The loaded result.
 */
void OnDataLoadedFromCloud(int stateKey, CloudDataLoadedResult result)
{
    /// Your code here...   
}
void OnFailedToLoadDataFromCloud(int stateKey, string err) { ... }
/**
 * Fired when failed to load data from the cloud.
 * 
 * @param stateKey
 *          int - The key of the state data.
 * 
 * @param err
 *          string - The error message.
 */
void OnFailedToLoadDataFromCloud(int stateKey, string err)
{
    /// Your code here...   
}
void OnCloudSaveConflictResolved(int stateKey, string resolvedVersion) { ... }
/**
 * Fired when a Cloud Save conflict is resolved successfully.
 * 
 * @param stateKey
 *          int - The key of the state data.
 * 
 * @param resolvedVersion
 *          string - The resolvedVersion of the conflict.
 */
void OnCloudSaveConflictResolved(int stateKey, string resolvedVersion)
{
    /// Your code here...   
}
void OnFailedToResolveCloudSaveConflict(int stateKey, string resolvedVersion, string err) { ... }
/**
 * Fired when failed to resolve a Cloud Save conflict.
 * 
 * @param stateKey
 *          int - The key of the state data.
 * 
 * @param resolvedVersion
 *          string - The resolvedVersion of the conflict.
 * 
 * @param err
 *          string - The error message.
 */
void OnFailedToResolveCloudSaveConflict(int stateKey, string resolvedVersion, string err)
{
    /// Your code here...   
}

[7] Build your App now.

[8] Test and verify if the Google Play Game Services functions work as expected, it would be helpful for you to address issues if you take a look at the logcat output (Android) or xcode debug console (iOS) to find the debug / error / warning messages. It is suggested that you use our convenient tool - "Device Console" to watch the Android logcat output, it can be found in "NeatPlug / Tools" from Unity menu.

[EOF] Should you have any questions or encounter any problems while integrating the plugin, please do not hesitate to shoot us an email at support@neatplug.com, we will be more than happy to help you. Thanks for choosing NeatPlug solutions!