playgameservices / play-games-plugin-for-unity

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

Google Play NO Authentication - Missing gpg.dll #737

Closed MattOstil closed 9 years ago

MattOstil commented 9 years ago

Hi all,

I've been plagued with this issue for the last week and have exhausted all of Google looking for help. I had incorporated the plugin successfully and had login and leaderboard integration up and running.

I recently added Ad Mobs to the game, and got that going as well. However, with that addition, the google play service plugin has stopped logging in. It doesn't succeed or fail, it simply just does nothing when the game starts up (assuming it doesn't attempt to authenticate?).

Here's the code I'm using:

    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();
         }
     }

I did run Logcat (as best I could understand), and found this error whenever I tapped on the leaderboard button. Based on the code, it will attempt to login instead if the player isn't already logged in.

 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)

I'm desperate for a fix on this, so any help would be appreciated! Thank you. :)

banditdevelopment commented 9 years ago

Did you try reinstalling the GPGS plug-in? Not sure if that is the problem, but it's worth a shot considering the log thinks a .dll is missing.

MattOstil commented 9 years ago

Wow that actually worked, thanks so much!

It's weird because I did reimport the package during this whole process, but it didn't work. When I redownloaded it just now and reimported, the missing files came with it. I wonder how my original package could have been so messed up ... it just never occurred to me that it was something that could happen. Haha.

Either way, it's all good. Thanks!

banditdevelopment commented 9 years ago

No problem, glad I could help. :)

If you are all set, please close this issue so the developers can focus on issues that need their attention.