Hi UnityAnswers,
I’ve did quite a bit of research into this and can’t find a solution that works for me. I’ve had Google Play Services working in my current game (logging in + leaderboards). However, with the recent addition of AdMob into my project, the app doesn’t log the player in.
I did some quick debugging, and it appears that it’s neither succeeding or failing. It just seems to hang.
Here is my simple code:
void Start()
{
PlayGamesPlatform.Activate();
Social.localUser.Authenticate(ProcessAuthentication);
}
void Login()
{
Social.localUser.Authenticate(ProcessAuthentication);
}
public void LoadLeaderboard()
{
if (Social.localUser.authenticated)
{
((PlayGamesPlatform)Social.Active).ShowLeaderboardUI(boardID);
}
else
{
Login();
}
}
Here is my logcat from when I press the leaderboard button. I know this is after the initial auto-attempt at signing in, but because it doesn’t authenticate, the button will attempt to sign in again:
I/Unity (31198): DllNotFoundException: gpg
I/Unity (31198): at (wrapper managed-to-native) GooglePlayGames.Native.Cwrapper.Builder:GameServices_Builder_Construct ()
I/Unity (31198): at GooglePlayGames.Native.PInvoke.GameServicesBuilder.Create () [0x00000] in <filename unknown>:0
I/Unity (31198): at GooglePlayGames.Native.NativeClient.InitializeGameServices () [0x00000] in <filename unknown>:0
I/Unity (31198): at GooglePlayGames.Native.NativeClient.Authenticate (System.Action`1 callback, Boolean silent) [0x00000] in <filename unknown>:0
I/Unity (31198): at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`1 callback, Boolean silent) [0x00000] in <filename unknown>:0
I/Unity (31198): at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`1 callback) [0x00000] in <filename unknown>:0
I/Unity (31198): at GooglePlay.Login () [0x00000] in <filename unknown>:0
I/Unity (31198): at GooglePlay.LoadLeaderboard () [0x00000] in <filename unknown>:0
I/Unity (31198): at UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) [0x00000] in <filename unknown>:0
I/Unity (31198): at UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters)
Thanks for any help! It’s just so frustrating, having released two mobile games in the past and now running into these really weird problems … >.>