開始使用 Google Play 遊戲服務
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁面將說明如何設定 Google Play 遊戲服務,並為 Android 遊戲新增功能。這項作業內容包括在 Google Play 管理中心設定服務,以及為遊戲新增功能,如登入、成就等。
請用以下連結直接前往各程式設計語言指南:
C 和 CPP
Unity
Java
C 及 Java 遊戲常常需要進行 Play 遊戲服務設定作業。不過,設定遊戲專案以及新增 Play 遊戲服務功能等作業的詳細流程會視遊戲專案主要使用的程式設計語言而有所不同。在這之中,Unity 遊戲的開始使用作業有更多不同之處,這是由於 Unity 遊戲需要使用外掛程式處理 Play 遊戲服務,而不額外使用 C# API 組合。
以下就是為遊戲設定 Play 遊戲服務和新增功能的基礎步驟:
設定 Play 遊戲服務。
設定遊戲專案並整合登入服務。
為遊戲專案設定並新增功能
測試並發布任何 Play 遊戲服務功能的變更內容。
事前準備
您必須在 Play 管理中心中設定Google Play 開發人員帳戶。詳情請見「註冊 Google Play 開發人員帳戶」。
設定 Play 遊戲服務
設定遊戲專案
您必須在遊戲專案中設定 Play 遊戲服務,並整合登入服務,才能新增其他 Play 遊戲服務功能。詳情請參閱下列指南。作業內容隨著遊戲專案主要使用的程式設計語言而有不同:
新增其他功能
整合登入後,您可以在遊戲中新增其他 Play 遊戲服務功能。這包括在 Play 管理中心設定功能,然後在遊戲專案中整合 API。詳情請參閱下列指南:
測試並發布 Play 遊戲服務更新內容
您在為遊戲專案加入 Play 遊戲服務功能之後,應該利用測試帳戶測試所有您對 Play 遊戲服務專案更新的內容,您在設定 Play 遊戲服務便已設定測試帳戶。對變更內容感到滿意之後,即可使用 Play 管理中心發布變更。這樣做不會發布遊戲,也只會更新 Google 代管的 Play 遊戲服務專案及服務。
後續步驟
設定 Play 遊戲服務並新增遊戲功能後,您可以使用 Play 遊戲服務 REST API 進行發布和管理工作。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[],[],null,["# Get started with Google Play Games Services\n\nThis page outlines how to set up [Google Play Games Services](/games/pgs/overview) and then\nadd features to an Android game. The tasks include setting up the service in\nGoogle Play Console and adding features to your game, such as sign-in and\nachievements.\n\nTo go straight to the guides for each programming language, use these links:\n\n[C and CPP](/games/pgs/cpp/cpp-start)\n[Unity](/games/pgs/unity/unity-start)\n[Java](/games/pgs/android/android-start)\n\nThe Play Games Services setup tasks are common for C and Java games. However,\nthe tasks that set up your game project and add Play Games Services features\nare specific to the main programming language used in the game project. The get\nstarted tasks for Unity games have additional difference because they use a\n[plugin](/games/pgs/unity/overview) for Play Games Services instead of having\nan additional set of C# APIs.\n\nHere are the basic steps to set up Play Games Services for a game and add\nfeatures:\n\n1. [Set up](#setup-pgs) Play Games Services.\n\n2. [Set up your game project](#setup-project) and integrate the Sign-in\n service.\n\n3. Set up and [add features](#add-features) to your game project.\n\n4. [Test and Publish](#test-publish) any changes you make to your\n Play Games Services features.\n\nBefore you start\n----------------\n\nYou must have a Google Play Developer account set up in\nPlay Console. For more information, see the\n[Register for a Google Play Developer account](https://support.google.com/googleplay/android-developer/answer/6112435).\n\nSet up Play Games Services\n--------------------------\n\n- To set up Play Games Services in Google Play Console, see the\n [set up](/games/pgs/console/setup) guide.\n\n- For Unity games: If you are developing your game in Unity, after you\n complete these, you must perform additional steps to configure the\n [Google Play Games plugin for Unity](/games/pgs/unity/overview). See the\n [plugin set up](/games/pgs/unity/unity-start) guide for details.\n\nSet up your game project\n------------------------\n\nYou must set up a Play Games Services in your game project and integrate the\n[Sign-in service](/games/pgs/signin) before adding other\nPlay Games Services features. See the following guides for details. These tasks\nare specific to the main programming language used by your game project:\n\n- [C and C++ games](/games/pgs/cpp/cpp-start)\n\n- [Unity games](/games/pgs/unity/unity-start)\n\n- [Java games](/games/pgs/android/android-signin)\n\nAdd additional features\n-----------------------\n\nAfter you integrate sign-in, you can add additional Play Games Services\nfeatures to your game. This involves setting up the feature in\nPlay Console and then integrating the API in your game project.\nSee the following guides for details:\n\n- [Achievements](/games/pgs/achievements)\n\n- [Leaderboards](/games/pgs/leaderboards)\n\n- [Events](/games/pgs/events)\n\n- [Friends](/games/pgs/friends)\n\n- [Saved games](/games/pgs/savedgames)\n\nTest and publish Play Games Services updates\n--------------------------------------------\n\nAfter you add Play Games Services features to your game project, you should\ntest any updates you make to your Play Games Services project using the\n[test accounts](/games/pgs/console/setup#start) that you setup when you\nconfigure Play Games Services. When you're satisfied with the changes, you can\nuse Play Console to [publish](/games/pgs/console/publish) them.\nThis does not involve publishing your game, and only updates the\nPlay Games Services project and services hosted by Google.\n\nWhat's next\n-----------\n\nAfter you set up Play Games Services and add features to your game, you can use\nthe Play Games Services REST APIs for\n[publishing](/games/pgs/publishing/publishing) and\n[management](/games/pgs/managment/managment) tasks."]]