PC용 Google Play 게임즈 게임 패키징
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
PC용 Google Play 게임즈는 표준 Android 런타임 환경을 제공하므로 x86 또는 x86-64 바이너리가 포함되어 있는지 확인하는 것 외에는 모바일 또는 PC용 게임 패키징 간에 차이가 없습니다. 가능하면 모바일 빌드와 마찬가지로 PC에서도 동일한 APK나 App Bundle을 사용해야 합니다.
모바일 및 PC용 Google Play 게임즈에서 하나의 패키지를 사용하는 경우 런타임에 PC용 Google Play 게임즈 관련 기능을 사용 설정하는 것이 좋습니다. 한 가지 방법으로는 키보드가 있는지 감지하는 것입니다.
Kotlin
val hasKeyboard = resources.configuration.keyboard == KEYBOARD_QWERTY
Java
boolean hasKeyboard = getResources().getConfiguration().keyboard == KEYBOARD.QWERTY
C#
var unityPlayerClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
var currentActivity = unityPlayerClass.GetStatic<AndroidJavaObject>("currentActivity");
var resources = currentActivity.Call<AndroidJavaObject>("getResources");
var configuration = resources.Call<AndroidJavaObject>("getConfiguration");
var keyboard = configuration.Get<int>("keyboard");
var hasKeyboard == 2; // Configuration.KEYBOARD_QWERTY
또 다른 방법은 "com.google.android.play.feature.HPE_EXPERIENCE"
시스템 기능을 확인하는 것입니다.
Kotlin
var isPC = packageManager.hasSystemFeature("com.google.android.play.feature.HPE_EXPERIENCE")
Java
PackageManager pm = getPackageManager();
boolean isPC = pm.hasSystemFeature("com.google.android.play.feature.HPE_EXPERIENCE")
C#
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");
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[null,null,["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Package a game for Google Play Games on PC\n\nSince Google Play Games on PC provides a standard Android runtime environment,\nthere are no differences between packing your game for mobile or PC outside of\nensuring that you include x86 or x86-64 binaries. When possible, you should use\nthe same APK or [App Bundle](/guide/app-bundle) on PC as you do for mobile\nbuilds.\n\nWhen using one package across mobile and Google Play Games on PC, it is best to\nenable Google Play Games on PC specific features at runtime either by\n[detecting the presence of a keyboard](/games/develop/all-screens#handle-interaction-models):\n\n\u003cbr /\u003e\n\n### Kotlin\n\n\u003cbr /\u003e\n\n val hasKeyboard = resources.configuration.keyboard == KEYBOARD_QWERTY\n\n\u003cbr /\u003e\n\n### Java\n\n\u003cbr /\u003e\n\n boolean hasKeyboard = getResources().getConfiguration().keyboard == KEYBOARD.QWERTY\n\n\u003cbr /\u003e\n\n### C#\n\n\u003cbr /\u003e\n\n var unityPlayerClass = new AndroidJavaClass(\"com.unity3d.player.UnityPlayer\");\n var currentActivity = unityPlayerClass.GetStatic\u003cAndroidJavaObject\u003e(\"currentActivity\");\n var resources = currentActivity.Call\u003cAndroidJavaObject\u003e(\"getResources\");\n var configuration = resources.Call\u003cAndroidJavaObject\u003e(\"getConfiguration\");\n var keyboard = configuration.Get\u003cint\u003e(\"keyboard\");\n var hasKeyboard == 2; // Configuration.KEYBOARD_QWERTY\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nOr by checking for the `\"com.google.android.play.feature.HPE_EXPERIENCE\"` system\nfeature: \n\n### Kotlin\n\n```kotlin\nvar isPC = packageManager.hasSystemFeature(\"com.google.android.play.feature.HPE_EXPERIENCE\")\n \n```\n\n### Java\n\n```java\nPackageManager pm = getPackageManager();\nboolean isPC = pm.hasSystemFeature(\"com.google.android.play.feature.HPE_EXPERIENCE\")\n \n```\n\n### C#\n\n```c#\nvar unityPlayerClass = new AndroidJavaClass(\"com.unity3d.player.UnityPlayer\");\nvar currentActivity = unityPlayerClass.GetStatic\u003cAndroidJavaObject\u003e(\"currentActivity\");\nvar packageManager = currentActivity.Call\u003cAndroidJavaObject\u003e(\"getPackageManager\");\nvar isPC = packageManager.Call\u003cbool\u003e(\"hasSystemFeature\", \"com.google.android.play.feature.HPE_EXPERIENCE\");\n \n```"]]