T
T
Torinar2019-02-28 00:47:36
Android
Torinar, 2019-02-28 00:47:36

How to make authorization in the game through google play services in unity?

Used this script.

using GooglePlayGames;
using GooglePlayGames.BasicApi;
using UnityEngine.SocialPlatforms;

    void Start()
    {
        PlayGamesPlatform.Activate();

        Social.localUser.Authenticate((bool success) => {
            if (success) Debug.Log("Удачно вошёл");
            else Debug.Log("Не удачно вошёл");
        });
    }

Installed the plugin (GooglePlayGamesPlugin-0.9.60) on Unity.
Linked the app to Play services.
But I keep having the same problem when I include this part of the script
Social.localUser.Authenticate((bool success) => {
            if (success) Debug.Log("Удачно вошёл");
            else Debug.Log("Не удачно вошёл");
        });

During the launch of an application downloaded from Google, after the splash screen, it crashes. I can't figure out what's wrong. Tell me please.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GFX Data, 2019-02-28
@ShockWave2048

Good afternoon.
1) get the ADB log for the release (or debug) version, the reason for the crash is usually indicated there (for example, the googleplay service is not worth it)
2) Accurately and super accurately check the points for googleplay (prerequestes) - https://github.com/playgameservices/ play games plus...

K
krug256, 2019-03-08
@krug256

Solved a problem? If yes tell me how. It's not the first day I've been suffering

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question