最近在升級(jí)Google Play Game的unity插件之后饵筑,出現(xiàn)登錄失敗的問題温圆,日志顯示需要Web Client ID
07-03 20:19:51.646: D/TokenFragment(3682): Fragment exists.. calling processRequests
07-03 20:19:51.646: D/TokenFragment(3682): Building client for: 4a8416a0 (a:true e:false i:true wc: WEB_CLIENTID f: false)
07-03 20:19:51.646: E/TokenFragment(3682): Web client ID is needed for Auth Code
07-03 20:19:51.646: D/TokenFragment(3682): Done with processRequest, result is pending.
初步懷疑是設(shè)置的Web Client ID丟失了,但是檢查之后發(fā)現(xiàn)并沒有丟失巷蚪,檢查代碼時(shí)發(fā)現(xiàn)Assets\GooglePlayGames\GameInfo.cs代碼里面的WebClientId和ApplicationId沒有設(shè)置挽荠,當(dāng)時(shí)并沒有發(fā)現(xiàn)問題,后來查了官方的升級(jí)說明(https://github.com/playgameservices/play-games-plugin-for-unity/blob/master/UPGRADING.txt)
)之后类缤,有說明 After upgrading, redo setup (click "Google Play Games | Android Setup" and/or
"Google Play Games | iOS Setup" on the menu). Do this even if you had already done
this before on this project. 做完這一步之后發(fā)現(xiàn)GameInfo.cs里面有修改WebClientId和ApplicationId的值,所以大致問題應(yīng)該就出在這里了邻吭,升級(jí)之后重新設(shè)置一遍