เนื่องจาก Google Play Games on PC มีสภาพแวดล้อมรันไทม์ Android มาตรฐาน การแพ็กเกมสำหรับอุปกรณ์เคลื่อนที่หรือ PC จึงไม่มีความแตกต่างกัน ยกเว้นการตรวจสอบว่าคุณได้รวมไบนารี x86 หรือ x86-64 ไว้แล้ว เมื่อเป็นไปได้ คุณควรใช้ APK หรือ App Bundle บน PC เดียวกันกับที่ใช้สร้างรุ่นอุปกรณ์เคลื่อนที่
เมื่อใช้แพ็กเกจเดียวในอุปกรณ์เคลื่อนที่และ Google Play Games บน PC วิธีที่ดีที่สุดคือเปิดใช้ฟีเจอร์เฉพาะของ Google Play Games บน PC ขณะรันไทม์โดยตรวจหาว่ามีแป้นพิมพ์อยู่หรือไม่ ดังนี้
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 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```"]]