Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Die Samples und Plug-ins für Google Play Spiele auf dem PC veranschaulichen die SDK-Integrationen für die Zertifizierung und Konfiguration von Spielen in der PC-Umgebung.
AGDKTunnel
AGDKTunnel basiert auf dem NDK-Beispiel „Endless Tunnel“. AGDKTunnel zeigt,
folgenden SDK-Integrationen für Google Play Spiele auf dem PC:
Google Play-Spieldienste für Play-Identität und Cloud-Speicherung
Eingabe-SDK für Google Play Spiele auf dem PC
Build für Google Play Spiele auf dem PC aktivieren
Build-Varianten werden verwendet, um zwischen der (mobilen) Standardplattform zu unterscheiden
und PC-Plattform. So erstellen Sie AGDKTunnel, um ihn in Google Play Spiele auf dem PC auszuführen:
Gehen Sie zu Build > Buildvariante auswählen und wählen Sie die Buildvariante playGamesPC aus.
Optional: Aktivieren Sie Google Play-Spieldienste, um den Cloud-Speicher auf Mobilgeräten und PCs zu aktivieren.
Optional: Aktivieren Sie die Play Asset Delivery API, um DXT1-komprimierte Textur-Assets bereitzustellen.
Google Play-Spieldienste aktivieren
Google Play-Spieldienste (PGS) werden für die Anmeldung und die Cloud-Speicherung verwendet.
So aktivieren Sie diese Funktionen:
Benennen Sie das AGDKTunnel-Paket in einen Namen Ihrer Wahl um.
Erstellen Sie eine Anwendung in der Google Play Console und folgen Sie der Anleitung, um die Google Play-Spieldienste mit Ihrem Paketnamen einzurichten.
Ersetzen Sie den Stringwert game_services_project_id in
app/src/main/res/values/strings.xml durch die ID Ihres Projekts im
Google Play Console
Trivial Kart
Ein Beispielspiel, das die Nutzung von Google Play-Technologien auf einem
Android mit der Unity-Engine
Für Google Play Spiele auf dem PC zeigt das Spiel Folgendes:
Play Integrity zum Empfangen von Integritätssignalen zur Geräteintegrität und zum Play-Lizenzstatus
Input SDK für Google Play Spiele auf dem PC
Konfigurationsinformationen finden Sie im Beispiel trivialkart-unity.
Unity-Plug-ins für Google Play Spiele
Plattform-Dienstprogramme
platform_utils_package ist ein Tool zum Automatisieren von Abläufen für Google Play Spiele auf dem PC mit Unity. Das Paket umfasst die folgenden Funktionen:
GPG-Plattformdefinition-Script: Fügen Sie der Liste der benutzerdefinierten Definitionen in den Player-Einstellungen die Definition UNITY_ANDROID_x86_64 hinzu.
Asset-Importer-Skript: Legt für jede importierte Textur eine ausgewählte Texturkomprimierung fest (standardmäßig DXTC)
Fensteroptionen: Hier legen Sie die Fensteroptionen fest, die unter Tools > GPG-Einstellungen verfügbar sind.
Mauseingabe mit Ein-/Aus-Schaltfläche für Leertaste
Ereignisse zum Status der Maustaste
Scroll-Ereignisse beim Mauszeiger
Erkennung der Displaygeometrie
Alle Inhalte und Codebeispiele auf dieser Seite unterliegen den Lizenzen wie im Abschnitt Inhaltslizenz beschrieben. Java und OpenJDK sind Marken oder eingetragene Marken von Oracle und/oder seinen Tochtergesellschaften.
Zuletzt aktualisiert: 2025-07-27 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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"]]