Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Contoh dan plugin untuk Google Play Game di PC menunjukkan integrasi SDK
untuk sertifikasi dan konfigurasi game di lingkungan PC.
Terowongan AGDK
AGDKTunnel
berasal dari contoh Endless Tunnel NDK. AGDKTunnel menunjukkan
berikut integrasi SDK Google Play Game di PC:
Layanan game Google Play untuk identitas Play dan simpan di cloud
Input SDK untuk Google Play Game di PC
Mengaktifkan build untuk Google Play Game di PC
Varian build digunakan untuk membedakan antara platform default (seluler)
dan platform PC. Untuk mem-build AGDKTunnel agar dapat berjalan di Google Play Game di PC,
ikuti langkah-langkah berikut:
(Opsional) Aktifkan Layanan game Google Play untuk mengaktifkan simpan di cloud di perangkat seluler dan PC.
(Opsional) Aktifkan Play Asset Delivery API untuk mengirimkan aset tekstur terkompresi DXT1.
Aktifkan Layanan game Google Play
Layanan game Google Play (PGS) digunakan untuk login dan menyimpan di cloud.
Untuk mengaktifkan fitur ini, lakukan hal berikut:
Ganti nama paket AGDKTunnel menjadi nama pilihan Anda.
Buat aplikasi di Konsol Google Play dan ikuti langkah-langkahnya
untuk menyiapkan Layanan game Google Play menggunakan nama paket Anda.
Ganti nilai string game_services_project_id di
app/src/main/res/values/strings.xml dengan ID project Anda di
Konsol Google Play.
Go-Kart Sedih
Contoh game yang mendemonstrasikan penggunaan teknologi Google Play di
Android dengan mesin Unity.
Untuk Google Play Game di PC, game ini mendemonstrasikan:
Layanan game Google Play untuk login, pencapaian, papan peringkat, teman, dan penyimpanan di cloud
Play Integrity untuk menerima sinyal integritas tentang integritas perangkat dan status lisensi Play
Input SDK untuk Google Play Game di PC
Lihat contoh trivialkart-unity untuk mengetahui informasi konfigurasi.
Plugin Unity Google Play Game
Utilitas platform
Class platform_utils_package
adalah alat untuk mengotomatiskan rutinitas
untuk Google Play Game di PC dengan Unity. Paket ini mencakup fitur berikut:
Skrip pendefinisian platform GPG: Menambahkan definisi UNITY_ANDROID_x86_64 ke daftar yang ditentukan secara khusus dalam setelan Pemain
Skrip pengimpor aset: Menetapkan setiap tekstur yang diimpor ke kompresi tekstur yang dipilih (DXTC secara default)
Opsi jendela: Menetapkan opsi jendela yang tersedia di bagian Alat > Setelan GPG
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# Samples and plug-ins\n\nThe samples and plug-ins for Google Play Games on PC demonstrate the SDK integrations\nfor certification and configuration of games in the PC environment.\n\nAGDKTunnel\n----------\n\n[AGDKTunnel](https://github.com/android/games-samples/tree/main/agdk/agdktunnel)\nis derived from the NDK sample Endless Tunnel. AGDKTunnel demonstrates the\nfollowing Google Play Games on PC SDK integrations:\n\n- Google Play Games Services for Play identity and cloud save\n- Input SDK for Google Play Games on PC\n\n### Enable build for Google Play Games on PC\n\nBuild variants are used to differentiate between the default (mobile) platform\nand the PC platform. To build AGDKTunnel to run in Google Play Games on PC,\nfollow these steps:\n\n1. Go to **Build \\\u003e Select Build Variant** and select the **playGamesPC** build variant.\n2. (Optional) Enable **Google Play Games Services** to turn on cloud save on mobile and PC.\n3. (Optional) Enable **Play Asset Delivery API** to deliver DXT1 compressed texture assets.\n\n### Enable Google Play Games Services\n\nGoogle Play Games Services (PGS) is used for sign-in and cloud save.\nTo enable these features, do the following:\n\n1. Rename the AGDKTunnel package to a name of your choosing.\n2. Create an application on the Google Play Console and follow the steps to set up Google Play Games Services using your package name.\n3. Replace the `game_services_project_id` string value in `app/src/main/res/values/strings.xml` with the ID of your project in the Google Play Console.\n\nTrivial Kart\n------------\n\nA sample game demonstrating use of Google Play technologies on\nAndroid with the Unity engine.\nFor Google Play Games on PC, the game demonstrates:\n\n- [Google Play Games Services](/games/pgs/overview) for sign-in, achievements, leaderboards, friends, and cloud save\n- [Play Integrity](/google/play/integrity/overview) for receiving integrity signals about device integrity and Play license status\n- The Input SDK for Google Play Games on PC\n\nSee the [trivialkart-unity](https://github.com/android/games-samples/tree/main/trivialkart/trivialkart-unity) sample for configuration information.\n\nGoogle Play Games Unity plug-ins\n--------------------------------\n\n### Platform utils\n\nThe [platform_utils_package](https://github.com/android/games-samples/tree/main/googleplaygamesforpc/unity_projects/platform_utils_package)\nis a tool for automating routines\nfor Google Play Games on PC with Unity. The package includes the following features:\n\n- GPG platform define script: Adds a UNITY_ANDROID_x86_64 define to the list of custom defines within Player settings\n- Asset importer script: Sets every imported texture to a chosen texture compression (DXTC by default)\n- Window options: Sets window options available under **Tools \\\u003e GPG Settings**\n\n### Input capture\n\nThe [input-capture_package](https://github.com/android/games-samples/tree/main/googleplaygamesforpc/unity_projects/input_capture_package)\ndemonstrates mouse input capture features:\n\n- [Mouse input capture](/games/playgames/input-mouse#capture_mouse_input) with Spacebar toggle\n- Mouse button state events\n- Mouse scroll events\n- Screen geometry detection"]]