Google Play Games requires that you add PC compatibility and PC optimizations to your game. In addition to these changes, you also need to update the graphics configuration of your game to ensure PC compatibility.
Please check out the Minimum PC requirements for users to install the platform as well as setup your development machine.
Include x86 ABI architecture
All the libraries included in your game require x86 ABI compatible versions to ensure the best performance and stability on the platform. Google Play Games supports both 32-bit and 64-bit version, but you only need to choose one to meet the requirement.
To ensure the greatest x86 processor compatibility, do not use the atom
instruction set when compiling your libraries. For example, when using
-march=atom and instead use either
Target architecture in Unity
If your game uses the Unity game engine, do the following to enable x86/x86-64 Android targets:
Go to Player Settings > Other Settings > Configuration > Scripting Backend and select IL2CPP from the dropdown menu to enable the IL2CPP Scripting Backend.
Enable x86 Android targets for your version of Unity:
Unity 2018 and earlier: go to Player Settings > Other Settings > Target Architecture, and select the x86 checkbox.
Unity 2019 Long Term Support (LTS) release and later: go to Player Settings > Other Settings > Target Architectures and enable both x86 (Chrome OS) and x86-64 (Chrome OS).
To maximize game engine support, we recommend enabling both x86 and x86-64 support, or only x86-64 so you're not limited by a 32 bit memory space.
Since Unity 2018 only supports x86 targets, you can skip x86-64 support. However, you can't release that build on Android due to the 64-bit requirement. In that case, you need to maintian a seperate build for Google Play Games.
Detect Google Play Games
You can detect the Google Play Games platform at runtime, allowing you to enable or disable platform-specific features in your game.
Check for the system feature
determine if your game is running on the Google Play Games platform:
var isPC = packageManager.hasSystemFeature("com.google.android.play.feature.HPE_EXPERIENCE")
PackageManager pm = getPackageManager(); boolean isPC = pm.hasSystemFeature("com.google.android.play.feature.HPE_EXPERIENCE")
var unityPlayerClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); var currentActivity = unityPlayerClass.GetStatic<AndroidJavaObject>("currentActivity"); var packageManager = currentActivity.Call<AndroidJavaObject>("getPackageManager"); var isPC = packageManager.Call<bool>("hasSystemFeature", "com.google.android.play.feature.HPE_EXPERIENCE");
Handle Android lifecycle Events
It's important to handle the
event in the Google Play Games environment. Your game will be visible
when a player activates the emulator overlay, and failing to listen to the
onPause event can lead to a poor user experience.
Update UI for PC compatibility
Certain UI elements and gestures are not suitable on PC and should be updated.
- Replace UI actions that need two or more fingers (eg: "Pinch to Zoom")
- All user-visible text should say "click" instead of "tap".
- Scrollable lists should have scrollbars.
- Pannable areas should either have scrollbars or some other way to traverse large distances quickly.
- Do not display a clickable keyboard onscreen for text entry.
All text entry should be within the text field bounds.
Clicks on visible elements should:
- Accept a click anywhere within the visible bounds of the element.
- Not accept a click in the area outside of the visible element.
Dialogs should have a visible close button. Do not detect a click outside of the dialog bounds.
Disable permissions dialogs
Google Play Games doesn't display permissions dialogs, so you shouldn't attempt to display them before requesting permissions. If you displayed them previously, you should update your application so it no longers displays them on a PC.
Unsupported Android features and permissions
On a PC, some Android features available on a mobile phone or tablet are inaccessible. This includes hardware features such as the camera and other features like a user's location. As a result, your game must not rely on unsupported Android features or permissions. On PC, if your game requests access to an unsupported permission, the request automatically fails.
To make your game compatible with PC, the following changes are required:
- In your app manifest, add
<uses-feature>declaration for all features that Google Play Games does not support. This applies to only the features already declared in your app manifest.
- Disable features from your game that depend on unsupported hardware and software features on PC. If you are using the same APK as your mobile game, then you can conditionally disable them for PC.
- Disable requests for unsupported Android permissions from your game, and features that depend on these permissions. If you are using the same APK as your mobile game, you can conditionally make these changes for PC, and you should not make any changes to the permissions declared in the manifest.
For more information on app manifest compatibility, see our guide on Chromebook app manifest compatibility.
Remove these hardware features before submitting the first test build to the Google Play Console:
For more information on how to remove the
android.hardware.wifi feature, see
Monitor connectivity status and connection metering.
For a complete list of unsupported featuress, see the
app manifest compatibility guide.
These commonly-used hardware features aren't compatible with PCs, so you must remove them before the final submission to Google Play Console:
The following commonly-used permissions aren't supported on PC:
External websites and WebViews
A browser intent loads on a PC's native web browser instead of one in the Google Play Games environment. This leads to an ideal experience for your players in most situations.
To ease porting, Google Play Games does support
this opens in the Google Play Games environment, it will lack the typical
desktop browser user experience. If you were previously using
invoke a browser intent.
Disable unsupported Google Play Service APIs
Google Play Games ships its own Google Play Services variant that contains only a subset of the Google Play Services APIs. You need to confirm that your application does not strongly depend on modules that are omitted or unsupported on PC. Consider that some modules may be available, but their functionality is not supported at all times. For example, Firebase Cloud Messaging will not function when Google Play Games is closed.
These modules are currently available and will be supported by Google Play Games in the future:
- Google Sign-In (not including account transfer, SmartLock, SMS verification, Password complexity calculation)
- Google Play Games Services
- Google Pay
The following modules are partially functional. We will do our best to support them on Google Play Games, but we cannot guarantee their functionality.
- Google AdMob (Mobile ads, Ad ID)
- Google Cloud Messaging (Deprecated, use Firebase Cloud Messaging)
- Firebase Authentication (Phone number auth does not work)
- Firebase Cloud Messaging
- Firebase Common Libraries
- Firebase ML
- Firebase Remote Config
- Firebase Analytics
These modules are not supported in Google Play Games, but do not cause issues in Google Play Games when they fail:
- Google Analytics (Deprecated, use Firebase Analytics)
- Google Cast
- Awareness API
- Drive (Deprecated, will be removed soon)
- Firebase Realtime Database
- Firebase A/B Testing
- Google Fit
- Address API
- Instant Apps API
- Location API
- Google Maps SDK
- SafetyNet (Deprecated, please fill the interest form for opting-in to the upcoming Play Integrity API)
- Google Tag Manager
- Wear OS
You should not use these moodules because they can cause unexpected behavior on Google Play Games.
Enable scoped storage
This section applies if your game read/writes to external storage. Scope storage enforcement is required as an alternative way to read and write to storage. Doing this removes the need to prompt the player for these sensitive permissions:
For more information on scoped storage see:
Disable mobile ads in the PC version of your game
To optimize your game for PC, you must disable mobile ads on your PC version, since they are incompatible with desktop and laptop PCs. This includes all ad units provided by mobile ad SDKs. You are not required to make any changes to ads in the mobile version of your game. We recommend using feature flags to limit changes only to the PC version of your game. You can still keep the mobile ads on Chrome OS.
When removing mobile ads, the following steps are required:
- Disable all mobile ad units, including banners, interstitials, and rewarded ads.
- Disable features from your game that depend on rewarded ads. For example, a feature that lets users watch a video ad to earn in-game currency could have the button deactivated or removed completely.
Legacy Google Analytics products do not function in Google Play Games. If this applies to you, you should migrate to Google Analytics 4.
This should only effect you if you're currently using Google Analytics 360. If you're using the Firebase SDK to track analytics events in your game and can see your game as a property in the Google Analytics Console, then you don't have to take any further action.