playgameservices / play-games-plugin-for-unity

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

Unity 5.2.2p1 and plugin 0.9.26 is just not working. It presents me with nothing. #776

Closed TheOtherJoJo closed 8 years ago

TheOtherJoJo commented 8 years ago

I had plugin 0.9.21 and Unity 5.1 installed and everything was fine except the ReportScore wasn't working. So I decided to upgrade to Unity 5.2 and the new plugin 0.9.26, and update the Android SDK and game play services to the latest builds, the java build to version 8, and to my surprise nothing works. I get nothing. I build my game to the device and nothing shows. I have created the file from the constants class, pasted in the Android Resources, and deleted the plugin and reimported it several times. I'm at my wits end. Please HELP!

I have a Facebook plugin from another source install in the project but that shouldn't be causing an issue should it? The Facebook plugin was working fine with 0.9.21.

claywilkinson commented 8 years ago

When you say "nothing" do you mean not even your scene is showing? Can you post the log?

TheOtherJoJo commented 8 years ago

Hello, I didn't mean to imply that my game is working, just the plugin. The game works fine. When I go to login when running from the device nothing happens. I don't get the notification that drops down from the top to let me know that I have sign. And when I tap on the log in button nothing happens.

Here is what the log file says: W/Unity (28708): !!! [Play Games Plugin DLL] 10/27/15 15:41:16 -07:00 WARNING: PlayGamesPlatform already initialized. Ignoring this call. W/Unity (28708):
W/Unity (28708): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) W/Unity (28708): I/Unity (28708): [Play Games Plugin DLL] 10/27/15 15:41:16 -07:00 DEBUG: Activating PlayGamesPlatform. I/Unity (28708):
I/Unity (28708): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (28708): I/Unity (28708): [Play Games Plugin DLL] 10/27/15 15:41:16 -07:00 DEBUG: PlayGamesPlatform activated: GooglePlayGames.PlayGamesPlatform I/Unity (28708):
I/Unity (28708): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (28708): I/Unity (28708): Building GPG services, implicitly attempts silent auth I/Unity (28708):
I/Unity (28708): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (28708): I/Unity (28708): InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK I/Unity (28708): at GooglePlayGames.Native.PInvoke.GameServicesBuilder.Build (GooglePlayGames.Native.PInvoke.PlatformConfiguration configRef) [0x00000] in :0 I/Unity (28708): at GooglePlayGames.Native.NativeClient.InitializeGameServices () [0x00000] in :0 I/Unity (28708): at GooglePlayGames.Native.NativeClient.Authenticate (System.Action1 callback, Boolean silent) [0x00000] in <filename unknown>:0 I/Unity (28708): at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action1 callback, Boolean silent) [0x00000] in :0 I/Unity (28708): at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`1 callback) [0x00000] in :0 I/Unity (28708): at GooglePlayServicesScript.SignInGPG () [0x00000] in :0 I/Unity (28708): at UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) [0x00000] in :0 I/Unity (28708): at UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) [0x00

claywilkinson commented 8 years ago

Looks like there is an issue with the native library. Can you share the log when the game firsts starts and tries a Play Game Services call? Also, you might try deleting the Assets/Plugins directory and re-import the plugin.

TheOtherJoJo commented 8 years ago

That log does include both the startup call and when pushing a button to log in.

I forgot to delete the plugin folder. I Wil try that...

Sent from phone

-------- Original message --------
From: Clayton Wilkinson
Date:10/28/2015 07:42 (GMT-08:00)
To: playgameservices/play-games-plugin-for-unity
Cc: TheOtherJoJo
Subject: Re: [play-games-plugin-for-unity] Unity 5.2.2p1 and plugin 0.9.26 is just not working. It presents me with nothing. (#776)

Looks like there is an issue with the native library. Can you share the log when the game firsts starts and tries a Play Game Services call? Also, you might try deleting the Assets/Plugins directory and re-import the plugin.


Reply to this email directly or view it on GitHub: https://github.com/playgameservices/play-games-plugin-for-unity/issues/776#issuecomment-151867702

TheOtherJoJo commented 8 years ago

Ok. Things are progressing well. Once I deleted the plugins folder and imported it again things are working as they should. However, there are two issues:

I'm seeing this line in the logcat : "W/ActivityManager( 738): Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL"

and when I try to report the score I'm not able to see the score in the Leaderboard. Here is the logcat:

I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:37:42 -07:00 DEBUG: Entering internal callback for AndroidPlatformConfiguration#InternalIntentHandler I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): W/ActivityManager( 738): mDVFSHelper.acquire() I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:37:42 -07:00 DEBUG: Application is pausing, which disconnects the RTMP client. Leaving room. I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): W/ActivityManager( 738): mDVFSHelper.acquire() W/ActivityManager( 738): mDVFSHelper.release() D/dalvikvm( 1185): GC_CONCURRENT freed 969K, 45% free 9833K/17740K, paused 3ms+5ms, total 99ms D/dalvikvm( 9079): GC_CONCURRENT freed 1958K, 27% free 13770K/18844K, paused 7ms+18ms, total 102ms D/dalvikvm(21290): threadid=19: thread exiting, not yet detached (count=0) D/dalvikvm( 1185): GC_CONCURRENT freed 1107K, 46% free 9637K/17740K, paused 4ms+3ms, total 38ms D/dalvikvm( 9079): GC_CONCURRENT freed 2085K, 28% free 13655K/18844K, paused 8ms+13ms, total 122ms W/ActivityManager( 738): Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL W/ActivityManager( 738): Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL W/ActivityManager( 738): Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL D/dalvikvm( 738): GC_EXPLICIT freed 3563K, 30% free 41558K/59092K, paused 8ms+50ms, total 434ms W/ActivityManager( 738): Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL W/ActivityManager( 738): mDVFSHelper.acquire() I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:37:57 -07:00 DEBUG: Showing UI Internal callback: VALID I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:37:58 -07:00 DEBUG: Invoking user callback on game thread I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:37:58 -07:00 DEBUG: Received UI callback: VALID I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): W/ActivityManager( 738): mDVFSHelper.release() I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:38:09 -07:00 DEBUG: Invoking user callback on game thread I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:38:09 -07:00 DEBUG: ReportScore: score=9792, board=CgkIw_XXxxxxxxxxxxx I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:38:09 -07:00 DEBUG: Native Submitting score: 9792 for lb CgkIw_XXxxxxxxxxxxx with metadata: I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:38:09 -07:00 DEBUG: Invoking user callback on game thread I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): D/dalvikvm(21290): threadid=19: thread exiting, not yet detached (count=0) I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:38:14 -07:00 DEBUG: ShowAchievementsUI callback is I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:38:14 -07:00 DEBUG: Entering internal callback for AndroidPlatformConfiguration#InternalIntentHandler I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): W/ActivityManager( 738): mDVFSHelper.acquire() I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:38:14 -07:00 DEBUG: Application is pausing, which disconnects the RTMP client. Leaving room. I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): W/ActivityManager( 738): mDVFSHelper.acquire() W/ActivityManager( 738): mDVFSHelper.release() W/dalvikvm(22028): VFY: unable to find class referenced in signature (Landroid/graphics/Outline;) I/dalvikvm(22028): Could not find method android.graphics.Outline.setRect, referenced from method com.google.android.play.headerlist.PlayHeaderListLayout$6.getOutline W/dalvikvm(22028): VFY: unable to resolve virtual method 770: Landroid/graphics/Outline;.setRect (Landroid/graphics/Rect;)V D/dalvikvm(22028): VFY: replacing opcode 0x6e at 0x0004 D/dalvikvm(21290): threadid=19: thread exiting, not yet detached (count=0) W/ActivityManager( 738): Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL W/ActivityManager( 738): mDVFSHelper.acquire() I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:38:50 -07:00 DEBUG: Showing UI Internal callback: VALID I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:38:50 -07:00 DEBUG: Invoking user callback on game thread I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): I/Unity (21290): [Play Games Plugin DLL] 10/28/15 22:38:50 -07:00 DEBUG: Received UI callback: VALID I/Unity (21290):
I/Unity (21290): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64) I/Unity (21290): W/ActivityManager( 738): mDVFSHelper.release() D/dalvikvm(22919): GC_CONCURRENT freed 925K, 43% free 10273K/17740K, paused 2ms+2ms, total 55ms

claywilkinson commented 8 years ago

INTERACT_ACROSS_USERS_FULL is caused build problems. It could be that the sdk versions for your build have changed, or sometimes using multiple keystores can also cause it. I'd suggest doing a clean build and see if that improves matters.

TheOtherJoJo commented 8 years ago

IT'S WORKING! IT'S WORKING!. Turns out it was my code that was causing the problem. I renamed the 'success' parameter to the ReportScore function.

claywilkinson commented 8 years ago

great! glad it is working now!

terenzeyuen commented 8 years ago

I am having the same problem – what was your issue? This is more code:

Social.ReportScore (score,"xxxxxxx", success => { Debug.Log(success ? "Reported score to leaderboard successfully" : "Failed to report score"); });

I can login and show leaderboard fine. ;(

TheOtherJoJo commented 8 years ago

I don't understand. Is it working for you or not? The problem I was having was two fold I believe. The first was that I rename the parameter to success1. When I changed it back to what it was originally which is success; and deleting and reimporting the Facebook plugin along with the gig plugin it worked.

terenzeyuen commented 8 years ago

Nope, not working. I can login and view leadeboard in my game but just not reporting any scores.

Oh this doesnt work for me too, it keeps loading and loading: PlayGamesPlatform.Instance.ShowLeaderboardUI("LEADERBOARDID");

I had to use, then choosing my leaderboard. Social.ShowLeaderboardUI();

Any help would be much appreciated