playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.47k stars 966 forks source link

UID returns 1000 for multiple users #2592

Open amoswazana opened 5 years ago

amoswazana commented 5 years ago

We've started noticing that multiple users that connect with GPGS are receiving a UID of "1000" (Social.Active.localUser.id == "1000"). These have up until now been only users with Galaxy devices (I will keep searching for different devices and update when I find one). I can't seem to reproduce this issue, it's very elusive... I'm writing this here to see if someone else has seen this issue or knows what is causing this. Versions: GPGS 0.9.63 Unity 2019.1

Code:

public void Init() {
    #if UNITY_ANDROID && gpgs
    PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();
    PlayGamesPlatform.InitializeInstance(config);
    // recommended for debugging:
    //PlayGamesPlatform.DebugLogEnabled = true;
    // Activate the Google Play Games platform
    PlayGamesPlatform.Activate();

    #endif
    Social.localUser.Authenticate(AuthCallback);
}

private void AuthCallback(bool success, string message) {
    if (success) {
        //good for android. Make sure for IOS
        _platformID = Social.Active.localUser.id;
    } else {
        _platformID = null;
    }
}
ScareCrow95 commented 4 years ago

Did you resolve this? I am facing the same issue as well

amoswazana commented 4 years ago

@amoswazana We have not solved the core issue but we implemented a workaround: Each time a user logs in with "1000" as their UID we simply ignore that string... 🤷‍♂️

nk-rakanishu commented 3 years ago

That would indicate google play games activation failed (1000 is the default).