This package has been deprecated and superseded by
com.bizsim.google.play.games.New repository: https://github.com/BizSim-Game-Studios/com.bizsim.google.play.games
The new package is a clean-slate rebuild under the
com.bizsim.google.play.*/com.bizsim.unity.figma.importernaming convention, with a Unity 6.0 LTS floor and workspace-standardized conventions. There is no automated migration path โ consumers must manually switch to the new package id. See the new repository'sCHANGELOG.mdfor details.This repository is archived and will not receive further updates. The historical content below is preserved for reference only.
Unity bridge for Google Play Games Services v2
โ ๏ธ Unofficial package. This is a community-built Unity bridge for Google Play Games Services v2. It is not an official Google product.
Version: 1.6.0 Unity: 6000.3+ Platform: Android License: MIT (package code) โ see Third-Party Licenses for SDK terms
- Features
- Sidekick Integration
- Google Play Compliance
- Installation
- Quick Start
- Documentation
- Architecture
- Troubleshooting
- License
- Terms of Service
- โ Authentication - Silent + manual sign-in with PGS v2, server-side access tokens
- โ Achievements - Unlock, increment, reveal, batch operations, local caching
- โ Leaderboards - Submit scores, load top/player-centered rankings, scoretags
- โ Cloud Save - Transaction-based saved games with metadata, cover image, conflict resolution
- โ Events - Batched event tracking with 5s flush interval, pause/quit flush
- โ Player Stats - Churn prediction, spend probability, engagement metrics
- โ Sidekick Ready - Unified config, readiness validator, Tier 1 & 2 compliance
This package supports Google Play's Sidekick AI assistant. Use GamesServicesConfig to configure services and the Sidekick Readiness Check editor window to validate compliance.
| Tier | Requirements | Deadline |
|---|---|---|
| Tier 1 | Auth + 10+ Achievements | July 2026 |
| Tier 2 | Tier 1 + Cloud Save with metadata | November 2026 |
// Save with full Sidekick metadata
var metadata = new SaveGameMetadata
{
description = "Level 5 - Factory District",
playedTimeMillis = totalPlayTimeMs,
coverImage = screenshotPngBytes, // max 800KB, 640x360
progressValue = 45
};
await GamesServicesManager.CloudSave.SaveAsync("slot1", data, metadata);
// Track events
await GamesServicesManager.Events.IncrementEventAsync("vehicle_dismantled", 1);See Documentation~/SIDEKICK-GUIDE.md for full integration guide.
Before publishing your game, you MUST comply with Google Play Games Services policies. Failure to comply may result in app rejection or removal from Google Play Store.
| Policy | Key Requirements | Link |
|---|---|---|
| Quality Checklist | โข Manual sign-in button if auto-auth fails โข 10+ achievements (4+ achievable in 1 hour) โข Achievement icons: 512x512 PNG โข Saved games MUST have cover image, description, timestamp |
Quality Checklist |
| Branding Guidelines | โข Use Google Play game controller icon for all UI entry points โข NEVER suppress pop-ups (welcome back, achievement unlock) โข NEVER include "Google Play Games" in your game TITLE |
Branding Guidelines |
| Data Collection | โข Friends data: 30-DAY MAX retention (delete or refresh) โข Friends data: ONLY for friends list UI (NOT analytics/advertising) โข Complete Google Play Data Safety form accurately |
Data Collection |
| Terms of Service | โข NEVER submit false gameplay data โข NEVER send multiplayer invites without user approval โข NEVER use player data for advertising โข NEVER share friends data with third parties |
Terms of Service |
-
Saved Games Metadata (Quality 6.1): MUST include cover image, description, and timestamp โ Use
CommitSnapshotAsync()with all 3 parameters (NOT simplifiedSaveAsync()) -
Friends Data Retention (Data Collection): 30-day maximum โ If implementing Phase 6 (Friends), add auto-delete after 30 days
-
Pop-up Suppression (Branding): NEVER interrupt Google's welcome/achievement pop-ups โ Don't hide/dismiss/overlay these notifications
-
Achievement Icons (Quality 2.4): 512x512 PNG on transparent background โ Configure in Google Play Console, NOT in Unity package
-
In Unity Editor: Window > Package Manager > + > Add package from git URL...
-
Enter:
https://github.com/BizSim-Game-Studios/com.bizsim.gplay.games.git -
Or add directly to
Packages/manifest.json:"com.bizsim.gplay.games": "https://github.com/BizSim-Game-Studios/com.bizsim.gplay.games.git"
"com.bizsim.gplay.games": "file:../path/to/com.bizsim.gplay.games"- Get your resources XML from Google Play Console
- Open the setup window: BizSim > Google Play > Games Services > Setup
- Paste the XML and click "Setup" to configure your Android project
Unity Menu โ BizSim โ Google Play โ Games Services โ Setup
- Get resources XML from Google Play Console
- Paste XML and parse configuration
- Click "Setup" to configure Android project
using BizSim.GPlay.Games;
void Start()
{
GamesServicesManager.Initialize();
GamesServicesManager.Auth.OnAuthenticationSuccess += OnAuthSuccess;
GamesServicesManager.Auth.OnAuthenticationFailed += OnAuthFailed;
}
async void AuthenticateUser()
{
try {
var player = await GamesServicesManager.Auth.AuthenticateAsync();
Debug.Log($"Welcome {player.DisplayName}!");
} catch (GamesAuthException ex) {
Debug.LogError($"Auth failed: {ex.Error.Message}");
}
}// Unlock achievement
await GamesServicesManager.Achievements.UnlockAchievementAsync("achievement_first_win");
// Increment incremental achievement
await GamesServicesManager.Achievements.IncrementAchievementAsync("achievement_100_wins", 1);
// Show achievements UI
await GamesServicesManager.Achievements.ShowAchievementsUIAsync();// Submit score
await GamesServicesManager.Leaderboards.SubmitScoreAsync("leaderboard_high_score", 12345);
// Show leaderboard UI
await GamesServicesManager.Leaderboards.ShowLeaderboardUIAsync("leaderboard_high_score");// โ
CORRECT: Full compliance with cover image, description, timestamp
var handle = await GamesServicesManager.CloudSave.OpenSnapshotAsync("slot1", true);
byte[] saveData = SerializeGameState();
byte[] screenshot = CaptureScreenshot(); // REQUIRED by Quality Checklist 6.1
await GamesServicesManager.CloudSave.CommitSnapshotAsync(
handle,
saveData,
description: "Level 5, 1500 coins", // REQUIRED
playedTimeMillis: GetPlayTime(), // REQUIRED
coverImage: screenshot // REQUIRED
);
// โ WRONG: Simplified API lacks required metadata (non-compliant!)
await GamesServicesManager.CloudSave.SaveAsync("slot1", saveData); // Missing cover image!var stats = await GamesServicesManager.Stats.LoadPlayerStatsAsync();
Debug.Log($"Churn probability: {stats.churnProbability}");
Debug.Log($"High spender probability: {stats.highSpenderProbability}");- Setup Guide: Unity Editor โ
BizSim/Google Play/Games Services/Setup - API Reference: Unity Editor โ
BizSim/Google Play/Games Services/Documentation - Development Plan:
docs/development-plans/google-play-games/00-INDEX.md - Official PGS Docs: https://developers.google.com/games/services
- Platform Abstraction: Android JNI โ Editor Mock providers
- Async/Await: Modern C# pattern (no callbacks)
- Event-Driven: Success/error events for all services
- ProGuard-Safe: AndroidJavaProxy callbacks with keep rules
- Conflict Resolution: Automatic with 60s timeout protection
- Local Caching: Achievements cached in PlayerPrefs (24h TTL)
| Issue | Solution |
|---|---|
| Authentication fails | Check google-services.json is in Assets/Plugins/Android/ |
requestServerSideAccess fails with status 10 |
You are using an Android OAuth client ID instead of a Web application (Game server) client ID. In Play Console โ Play Games Services โ Configuration, copy the Client ID from the Game server credential, not the Android credential. |
| Achievements not unlocking | Verify achievement IDs match Google Play Console exactly |
| Leaderboard not showing | Ensure leaderboard is published in Play Console |
| Cloud save conflict | Handle OnConflictDetected event and call conflict.ResolveAsync() |
| Build errors (ProGuard) | Package includes ProGuard rules - ensure Gradle build uses them |
This package's C# and Java source code is licensed under the MIT License โ Copyright (c) 2026 BizSim Game Studios.
See LICENSE.md for the full MIT license text.
This package does not bundle any Google SDK binaries. Native Android dependencies are resolved at build time via Gradle from the Google Maven repository (maven.google.com):
| Dependency | Version | License |
|---|---|---|
com.google.android.gms:play-services-games-v2 |
21.0.0 | Android SDK License Agreement |
com.google.android.gms:play-services-tasks |
18.4.1 | Android SDK License Agreement |
By installing and using this package, you agree to the Android Software Development Kit License Agreement and the Google APIs Terms of Service.
For full third-party license details, see NOTICES.md.
Google Play Services libraries contain open source components. Google requires that apps display these notices to end users. See Include open source notices for instructions on using the oss-licenses-plugin Gradle plugin.
By using this package, you agree to comply with:
- Google Play Developer Policies
- Google Play Games Services Terms
- Google Controller-Controller Data Protection Terms
Key Obligations:
- Submit only authentic gameplay data
- Obtain explicit user approval for multiplayer invites/gifts
- Use player data ONLY for game features (NOT advertising)
- Delete friends data after 30 days OR refresh via new API calls
- Complete Google Play Data Safety section accurately