playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.43k stars 954 forks source link

Sign In window never shows up. #3058

Closed ShiverPurple closed 2 years ago

ShiverPurple commented 2 years ago

It's been 3 days that i'm trying to get this to work, i've read all the docs and a lot of posts/videos but still can't. No errors, it just looks like it's ignoring everything from the plugin when i upload to Play Console. Any ideas?

The setup i have:

void Start()
 {

    Instance = this;
    // Persist through scenes
    DontDestroyOnLoad(this.gameObject);

    PlayGamesClientConfiguration.Builder config = new PlayGamesClientConfiguration.Builder();

    // Enables saving game progress
    if (enableSaveGame)
        config.EnableSavedGames();

    PlayGamesPlatform.InitializeInstance(config.Build());
    PlayGamesPlatform.Activate();
    SignIn();

 }

public void SignIn()
{

    teste1.text = "Outside method";

    Social.localUser.Authenticate((bool success) =>
    {

        teste1.text = "Passed";

        if (success) { teste1.text = "Success"; }
        else
        { 
            teste1.text = "Error";
        }

    });
}`

On Editor it prints "Error" from the above method but nothing happens in the Playstore build.

Also tried:

PlayGamesPlatform.Instance.Authenticate(SignInInteractivity.CanPromptOnce, (result) =>{ // handle results });

As said in the docs.

ShiverPurple commented 2 years ago

Fixed it myself. I don't know exactly what i did that fixed it, so i'll just list everything:

Hope it helps anyone else, problem solved!