如何使用Google 登錄接入之Unity
來(lái)源:
未知 |
責(zé)任編輯:傳說(shuō)的落葉 |
發(fā)布時(shí)間: 2018-03-05 11:39 | 瀏覽量:
unity3d的項(xiàng)目有的需要使用Google登錄,下面就讓納金網(wǎng)小編來(lái)告訴大家,使用Google登錄需要注意的那些坑:
第一步:
Unity接入Google登錄官網(wǎng)接入文檔(不用FQ也是可以打開(kāi)的):https://github.com/playgameservices/play-games-plugin-for-unity
點(diǎn)擊current-build后下載 GooglePlayGamesPlugin-0.9.39a.unitypackage






第二步:
下載后的文件雙擊就可以導(dǎo)入unity工程了。
導(dǎo)入后如果碰到unity報(bào)錯(cuò)


則需要打開(kāi)SDK Manager下載

切換unity工程為android平臺(tái)(File->Build Setting->Android->Switch platform


第三步:
加下來(lái)點(diǎn)擊unity菜單中的Window->Google Play Games->Setup->Android setup...,(操作如下圖)


就可以打開(kāi)如下界面:

第四步:


接下來(lái)就是填寫(xiě)上圖中2個(gè)紅框的部分。
第一個(gè)紅框中填寫(xiě)的內(nèi)容,其實(shí)是你在Google申請(qǐng)的應(yīng)用的成就信息。
第二個(gè)紅框(即Client ID)填寫(xiě)的是Google APIs中項(xiàng)目OAuth 2.0客戶端ID中網(wǎng)頁(yè)客戶端(Web客戶端)的客戶端ID(這里特別要注意了 必須填寫(xiě)Web客戶端的ID,否則是不行的)
網(wǎng)址:https://console.developers.google.com/apis/credentials?project=myproject-1234
填寫(xiě)完事后點(diǎn)擊Setup按鈕,設(shè)置完成
接下來(lái)就是Unity中寫(xiě)登錄代碼了


第五步:
打包之前 記得設(shè)置最小的API Level為4.0以上


-
分享到:
相關(guān)文章
網(wǎng)友評(píng)論
您需要登錄后才可以發(fā)帖 登錄 | 立即注冊(cè)
關(guān)閉
- 用戶名:
- 密 碼:
- 驗(yàn)證碼:
看不清? 點(diǎn)擊更換
- 忘記密碼?
全部評(píng)論:0條
推薦
熱門(mén)