2018-10-04

Google Play Game Services en Unity3D

Google Play Game Services en Unity3D:


How to Config:
1) Install in Unity (Import package):
https://github.com/playgameservices/play-games-plugin-for-unity
(current build)

2) Configure in unity: Window > Google Play Games > Setup > Android Setup

- Create "keystore" and save it (game.keystore).
- Get "SHA1" with "keytool" (see point 3).
- Create app/linked app/leaderboard un Google Play Console.


Constant Class: this can be whatever you want, just give it a name

Resource Definition: in your google play console, go to "game services" and to your app (or "Add New game".
 Select either leaderboards (marcadores) or achievements (create them if you've not set them up) and at the bottom you'll see the 'get resources' link. Click that (it will show new window) and paste it into the box in Unity.

Client ID: also in the game services, go down to linked apps (again, assuming you've already set this up) and click on your game from the list. At the bottom copy the string under "OAuth2 Client ID".


3) Code:
SPANISH:
http://edgargomez.es/unity3d-integrando-google-play-game-services/
ENGLISH:
Unity3D-GooglePlayGames-English

*Before Build*
1/2)
edit APP_ID in androidmanifest:

replace "\ " with "\u003

before:
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\ 232323232323" />

after:
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\u003232323232323" />


DEBUG:
C:\Users\XX\AppData\Local\Android\Sdk\platform-tools> adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG

2/2)
*Be sure to uncheck "Development Build" in "File-Build settings", before build.

No comments:

Post a Comment

Hi!
Post your comments here
Thanks!!

Hola
Deja tus comentarios aquí, muchas gracias!!

Unity Remote

Simple solution to not working Unity Remote on your tablet/phone, its easy: ON YOUR DEVICE (tablet , phone): 1) Enable "Developer ...