> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 將 Unity 遊戲移轉至 Google Play Games 登入

> 將 Unity Android 玩家從 PlayFab 的 LoginWithGoogleAccount API 移轉至 Google Play Games 登入和更新版 Play Games Plugin 的概觀。

## 何時可能需要移轉

如果您先前在 Android 上的 Unity 遊戲中使用 PlayFab LoginWithGoogleAccount API，您可能已經注意到，在最新版本 (>= 0.11.x) 的 [Play Games Plugin for Unity](https://github.com/playgameservices/play-games-plugin-for-unity) 中，您無法再取得此 API 所需的 ServerAuthCode。

這是因為 PlayFab LoginWithGoogleAccount API 需要 "profile" 範圍才能運作。不過，最新版本的 Play Games Plugin for Unity (>= 0.11.x) 不支援新增額外範圍的功能，使得依賴 LoginWithGoogleAccount API 的遊戲開發人員無法將遊戲升級至最新版本的外掛程式。

我們已注意到此問題，並找到讓 PlayFab LoginWithGoogleAccount API 能與 Play Games Plugin for Unity 0.11.x 版搭配運作的方法。不過，建議的做法是在仍使用 0.10.x 版時，將現有玩家移轉 (連結) 至其 Play Games 設定檔，這將移除對 PlayFab LoginWithGoogleAccount API 的依賴。一段時間之後，再將前述修正方法作為後援方法，用於在 0.10.x 期間未移轉的其餘玩家

建議的做法如下：

1. 在仍使用 0.10.x 時，使用下列移轉程序步驟移轉您的玩家，並務必追蹤哪些使用者已移轉為使用 LoginWithGooglePlayGamesServices。由於移轉玩家需要玩家開啟遊戲，因此在此期間可能會有部分玩家未能有效移轉。

   [LoginWithGooglePlayGamesServices 移轉程序步驟](/zh-TW/services/playfab/identity/player-identity/platform-specific-authentication/google-play-games-sign-in-migration-details)

2. 對於在該期間無法移轉的其餘現有玩家，請使用下列修正步驟，在 0.11.x 版的外掛程式中繼續使用 LoginWithGoogleAccount。由於必須透過瀏覽器登入可能會影響玩家體驗，因此應將此視為後援替代方案。

   [LoginWithGoogleAccount 修正步驟](/zh-TW/services/playfab/identity/player-identity/platform-specific-authentication/google-play-games-sign-in-migration-fallback)


## Related topics

- [在 Unity 中從 Google 登入移轉至 Google Play Games](/zh-TW/services/playfab/identity/player-identity/platform-specific-authentication/google-play-games-sign-in-migration-details.md)
- [從 Google 登入移轉至 Play Games 登入的後援方法](/zh-TW/services/playfab/identity/player-identity/platform-specific-authentication/google-play-games-sign-in-migration-fallback.md)
- [將 XDK 網路功能移轉至 XBOX GDK](/zh-TW/build/console-features/networking/xdk-migration/index.md)
- [將現有的輸入程式碼移植到 GameInput](/zh-TW/build/core-features/common/input/porting/index.md)
- [XBOX One Software Development Kit 移轉指南](/zh-TW/build/console-features/networking/xdk-migration/xdk-migration-toc.md)
