On Nov 10, 2026 the Android Developers Blog announced the Sign in with Google Mobile Plugin for Unity, now open source on GitHub (googlesamples/siwg-mobile-unity-plugin). It replaces the deprecated sample bridges that, in the blog's words, struggled with modern Gradle pipelines and AndroidX requirements. If you ship a Unity game on Android, this is the first-party route to Credential Manager sign-in. Everything below comes from the announcement and the repository README, both fetched today.
1. What the plugin actually is
It is a thin native bridge: Kotlin on Android calling Android's Credential Manager, Objective-C++ on iOS calling GIDSignIn. The announcement stresses "native-only bridges" with minimal runtime overhead and no legacy baggage. It is distributed as a pre-built .unitypackage and is licensed Apache-2.0.
The design choice worth noting is that it is backend-agnostic. Instead of owning your session, it hands your C# code a signed Google ID token and stops. From there you can exchange it with Firebase Authentication, Supabase, Auth0 or your own user service.
2. Setup, in the order that avoids pain
- Create OAuth credentials in Google Cloud: Web, Android and iOS client IDs.
- Install the External Dependency Manager for Unity (EDM4U), then import
siwg_unity_mobile_plugin.unitypackagefrom the repo's Releases. - Open Window > Google Sign-In Native > Settings, enter the Web Client ID and the iOS Reversed Client ID, and save. No manual manifest edits.
- Run Assets > External Dependency Manager > Android Resolver > Force Resolve to pull the
googleidandandroidxlibraries. - Create a
GoogleSignInManagerGameObject, attachGoogleSignInManager.cs, and assign theGoogleSignInNativeSettingsasset fromAssets/GoogleSignInNative/Resources.
Migrating an existing project: back it up, remove any older Google Sign-In plugin first, and note that Unity will not overwrite your custom baseProjectTemplate.gradle or settingsTemplate.gradle, so you must merge the Kotlin 1.9.24 definitions by hand.
3. The C# API
The surface is deliberately tiny: one call and two static events.
using UnityEngine;
public class AuthController : MonoBehaviour
{
private void OnEnable()
{
GoogleSignInManager.OnSignInCompleted += OnToken;
GoogleSignInManager.OnSignInFailed += OnError;
}
private void OnDisable()
{
GoogleSignInManager.OnSignInCompleted -= OnToken;
GoogleSignInManager.OnSignInFailed -= OnError;
}
public void OnLoginButtonPressed() => GoogleSignInManager.Instance.StartSignIn();
private void OnToken(string idToken) { /* send idToken to your backend */ }
private void OnError(string error) => Debug.LogError(error);
}
Always unsubscribe in OnDisable, as above: the events are static, so a destroyed scene object that stays subscribed will keep receiving callbacks. Also note the README sample logs a prefix of the token with Substring(0, 15); that call would throw on a shorter string, so do not copy it into production, and never log a full token.
Verify server-side: treat the ID token as untrusted input until your backend validates its signature and audience. The client only proves that Credential Manager returned something; your server decides whether to create a session.
4. Gotchas from the README
- Identity only, no scopes. The plugin returns a Google ID token and, per the README, does not currently support requesting scopes. If you need Drive or Play Games scopes, this is not enough on its own.
- Android API level. The README says to set Minimum API Level to 34 or higher. Check that against your current audience before adopting.
- Kotlin versions. Unity versions before 6.5 did not enable Kotlin by default, so you may need
android.builtInKotlin=trueingradleTemplate.properties. Thegoogleidlibrary was built with Kotlin 2.4.x while Unity's default is 2.1.0, so afreeCompilerArgsblock with-Xskip-metadata-version-checkis required. - Documentation gaps. The README does not document sign-out or nonce handling, and states no minimum iOS version. It also contradicts itself slightly on Unity versions: "6.5+" in the feature list, "Unity 6 LTS" in the new-project path.
- Support level. The README says the project is not intended for active development and issues are handled best-effort. Plan to fork and pin a release.
5. Why this matters if you are a native Android dev
The announcement frames Unity as powering over half of all mobile titles worldwide, which is why first-launch friction matters. The Android half of this plugin is the same Credential Manager flow you would write in Kotlin, so everything you know about passkeys, one-tap sign-in and token exchange carries over. The useful lesson is architectural: keep the native layer to "get a token", and let your backend own the session.
Adoption checklist: confirm API 34 fits your audience, pin a release tag, merge the Kotlin settings into custom Gradle templates, validate tokens on your server, and add your own sign-out path since the README does not cover one.
Sources: Android Developers Blog, "Powering Seamless Player Sign-In: Introducing the Open-Source Sign in with Google Plugin for Unity" (Nov 10, 2026), and the googlesamples/siwg-mobile-unity-plugin README on GitHub, retrieved Nov 16, 2026.
No comments yet. Be the first to leave one!