Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Google Play Services suddenly stopped working?

Discussion in 'Multiplayer' started by hussain0305, Feb 22, 2019.

  1. hussain0305

    hussain0305

    Joined:
    Jun 1, 2017
    Posts:
    15
    So I made a game on Unity for android and setup google play services - everything was working fine the first few days. I could see the login prompt on my build when running on android and scores and everything were being updated on the leaderboard. Then recently, it suddenly stopped working. For the past few builds, I have seen neither the google play login prompt, nor the successful login prompt (when it shows your profile level and pic at the top). I have placed an indicator on the main menu which changes color based on whether or not the connection was successful, and it says successful every time, but nothing happens.
    This is my code that's called on BeginPlay:
    void AuthenticateUser()
    {

    PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();
    PlayGamesPlatform.InitializeInstance(config);
    PlayGamesPlatform.Activate();
    Social.localUser.Authenticate((bool success) =>
    {
    if (success == true)
    {
    ConnectionIndicator.color = ConnectedColor;
    }
    else
    {
    ConnectionIndicator.color = DisconnectedColor;
    }
    });
    }

    Been scratching my head about this but I haven't figured it out yet. Any help is greatly appreciated. Thanks!
     
  2. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,732
    Have you checked logcat to see if you're getting any errors when posting scores, opening leaderboards etc., or indeed any other errors that might be causing those scripts to fail?
     
  3. OWL7seven

    OWL7seven

    Joined:
    Apr 3, 2014
    Posts:
    6
    theedi80, Zanthous and Munchy2007 like this.