با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
نمونهها و افزونهها برای بازیهای Google Play در رایانه شخصی، ادغامهای SDK را برای صدور گواهینامه و پیکربندی بازیها در محیط رایانه شخصی نشان میدهند.
تونل AGDK
AGDKTunnel از نمونه NDK Endless Tunnel مشتق شده است. AGDKTunnel بازی های Google Play زیر را در ادغام PC SDK نشان می دهد:
خدمات بازیهای Google Play برای هویت Play و ذخیره ابری
SDK را برای بازیهای Google Play در رایانه شخصی وارد کنید
ساخت را برای بازیهای Google Play در رایانه شخصی فعال کنید
انواع ساخت برای تمایز بین پلتفرم پیش فرض (موبایل) و پلتفرم رایانه شخصی استفاده می شود. برای ساخت AGDKTunnel برای اجرا در بازیهای Google Play روی رایانه شخصی، مراحل زیر را دنبال کنید:
به Build > Select Build Variant بروید و نوع ساخت playGamesPC را انتخاب کنید.
(اختیاری) خدمات بازی های Google Play را برای روشن کردن ذخیره ابری در تلفن همراه و رایانه شخصی فعال کنید.
(اختیاری) Play Asset Delivery API را برای ارائه دارایی های بافت فشرده DXT1 فعال کنید.
خدمات بازی های Google Play را فعال کنید
خدمات بازی های Google Play (PGS) برای ورود به سیستم و ذخیره ابری استفاده می شود. برای فعال کردن این ویژگی ها، موارد زیر را انجام دهید:
بسته AGDKTunnel را به نام دلخواه خود تغییر نام دهید.
یک برنامه کاربردی در کنسول Google Play ایجاد کنید و مراحل راه اندازی خدمات بازی های Google Play را با استفاده از نام بسته خود دنبال کنید.
مقدار رشته game_services_project_id را در app/src/main/res/values/strings.xml با شناسه پروژه خود در کنسول Google Play جایگزین کنید.
کارت پیش پا افتاده
نمونه بازی نشان دهنده استفاده از فناوری های Google Play در اندروید با موتور Unity. برای بازیهای Google Play روی رایانه شخصی، این بازی نشان میدهد:
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-29 بهوقت ساعت هماهنگ جهانی."],[],[],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"]]