Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Constants class name

Discussion in 'Multiplayer' started by Beniamino, Oct 3, 2015.

  1. Beniamino

    Beniamino

    Joined:
    Jul 25, 2015
    Posts:
    17
    Been searching for a long time to get the Google Play services to work with games. For right now I am looking for what to write in the "Constants class name" field for "Google Play Games - Android Configuration". Would appreciate if someone could let me know on that. As for resources Definition I have some code beginning with

    <?xml version="1.0" encoding="utf-8"?>
    <!--
    Google Play game services IDs.

    Thanks in advance if anyone can help on that.
     
  2. ahsanzaman34

    ahsanzaman34

    Joined:
    Jun 23, 2015
    Posts:
    1
    hello, same problem here . did you find anything helpful . Please share. :)
     
  3. Beniamino

    Beniamino

    Joined:
    Jul 25, 2015
    Posts:
    17
    Sorry not yet but it seems to create a C# file based on what word I type in there. Are you also having trouble getting Google Play services to work? I've been trying for a week or two now.
     
  4. BrunoBelmonte

    BrunoBelmonte

    Joined:
    Jan 16, 2013
    Posts:
    7
    You will set your Constants Class Name as this example: mygame.GPGSIDs
    GPGSIDs stands for Google Play Game Services IDs. This will create the GPGSIDs script under de mygame folder

    For Resources Definition, this data is found in the Google Play Developer Console by clicking "Get resources" on any of the resource pages (e.g. Achievements or Leaderboards), then clicking Android.

    And the Oauth2 Client ID id is found under Apps Linked / bound apps on your GPG DevConsole, just clicking on your app name.
    You want the Oauth2 Client ID that's something like this: 2356877654345.gbn3413n434mn14b13m.apps.googleusercontent.com
     
    auzzzy, liju and M-A-N like this.
  5. Beniamino

    Beniamino

    Joined:
    Jul 25, 2015
    Posts:
    17
    Thank you Bruno. Right now it seems to be working with just putting "Constants" in the constants class name field.
     
  6. rajan4uto

    rajan4uto

    Joined:
    Nov 27, 2014
    Posts:
    2
    Actually you can put anything into Constants class name but for Resources Definition, go to Developer console and click on "get resource" on Achievement or Leaderboard tab as Bruno say.
     
  7. TTANTOTDR

    TTANTOTDR

    Joined:
    Apr 1, 2016
    Posts:
    3
    Guys, i have a problem with the Constant class name of the setup.
    I put all in order and says this: Invalid Clasname: An exception was trown by the type initialaizer for GooglePlayGames.Editor.GPGSDependencies.
    I searched all away on the internet but i found no solution.

    Please help guys.
     
  8. M4CAR

    M4CAR

    Joined:
    Jun 12, 2016
    Posts:
    1
    Just update the google play services through the SDK manager and the error should disappear.
     
  9. TTANTOTDR

    TTANTOTDR

    Joined:
    Apr 1, 2016
    Posts:
    3
    Keeps giving me that error, Thank you anyway,
     
  10. TTANTOTDR

    TTANTOTDR

    Joined:
    Apr 1, 2016
    Posts:
    3
  11. liju

    liju

    Joined:
    Apr 4, 2014
    Posts:
    6

    Thank you BrunoBelmonte, you save my time
     
  12. johnnieZombie

    johnnieZombie

    Joined:
    Oct 23, 2012
    Posts:
    27
    You will not see a "Get Resources" link anywhere until you create a leaderboard, achievement, or event and save. Then it will appear.
     
  13. Margallo

    Margallo

    Joined:
    May 1, 2016
    Posts:
    6
    Hello guys! Can you give me some example script how to use the leaderboards in the play service? i'm stock on eat i just want my game have a leaderboard please help me.