playgameservices / play-games-plugin-for-unity

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

Google Play service issues on iOS #656

Closed itsharshdeep closed 9 years ago

itsharshdeep commented 9 years ago

I am using Unity version 5.1.1 f1. In this I'm using Google Play service plugin 'GooglePlayGamesPlugin-0.9.15' for Google Plus login. It is working fine in Android but in iOS it is showing error listed below

ArgumentException: Object contains non-primitive or non-blittable data. at System.Runtime.InteropServices.GCHandle.Alloc (System.Object value, GCHandleType type) [0x00000] in :0 at GooglePlayGames.Native.PInvoke.Callbacks.ToIntPtr (System.Delegate callback) [0x00000] in :0 at GooglePlayGames.Native.PInvoke.GameServicesBuilder.SetOnAuthFinishedCallback (GooglePlayGames.Native.PInvoke.AuthFinishedCallback callback) [0x00000] in :0 at GooglePlayGames.Native.NativeClient.InitializeGameServices () [0x00000] in :0 at GooglePlayGames.Native.NativeClient.Authenticate (System.Action1 callback, Boolean silent) [0x00000] in <filename unknown>:0 at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action1 callback, Boolean silent) [0x00000] in :0 at UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) [0x00000] in :0 at UnityEngine.EventSystems.ExecuteEvents.Execute[IDragHandler](UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) [0x00000] in :0 at UnityEngine.EventSystems.TouchInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, Boolean pressed, Boolean released) [0x00000] in :0 at UnityEngine.EventSystems.TouchInputModule.ProcessTouchEvents () [0x00000] in :0

(Filename: currently not available on il2cpp Line: -1)

Please help me out I have spent 4-5 days for resolving this but its still there

Thanks a lot in Advance.

claywilkinson commented 9 years ago

I believe some of the memory management was cleaned up in 0.9.20 - can you try the latest plugin?

itsharshdeep commented 9 years ago

@claywilkinson First of thanks a lot for the reply .. Your suggestion worked.. But now the issue is this plugin is not working on the Android.. I have to put 0.9.15 for Android & 0.9.20 for iOS .. is there is any solution in which I can use the common plugin for both platforms

claywilkinson commented 9 years ago

What's the problem on Android? When you installed the new version of the plugin, did you re-run Android Setup? (Window > Google Play Games > Setup > Android Setup...). That is usually the step I forget when switching platforms.

itsharshdeep commented 9 years ago

@claywilkinson Thanks for the again reply :) Yes I followed the steps as you said. But I am getting the following error in Android with 0.9.20 : I'm pasting these logs from Eclipse. I m using Android 4.1.2

08-12 10:23:33.853: I/Unity(18996): InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK 08-12 10:23:33.853: I/Unity(18996): at GooglePlayGames.Native.PInvoke.GameServicesBuilder.Build (GooglePlayGames.Native.PInvoke.PlatformConfiguration configRef) [0x00000] in :0 08-12 10:23:33.853: I/Unity(18996): at GooglePlayGames.Native.NativeClient.InitializeGameServices () [0x00000] in :0 08-12 10:23:33.853: I/Unity(18996): at GooglePlayGames.Native.NativeClient.Authenticate (System.Action1 callback, Boolean silent) [0x00000] in <filename unknown>:0 08-12 10:23:33.853: I/Unity(18996): at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action1 callback, Boolean silent) [0x00000] in :0 08-12 10:23:33.853: I/Unity(18996): at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action1 callback) [0x00000] in <filename unknown>:0 08-12 10:23:33.853: I/Unity(18996): at GooglePlayGames.PlayGamesLocalUser.Authenticate (System.Action1 callback) [0x00000] in :0 08-12 10:23:33.853: I/Unity(18996): at login.LoginViaGoogle () [0x00000] in :0 08-12 10:23:33.853: I/Unity(18996): at UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) [0x00000] in <fil

claywilkinson commented 9 years ago

There should be another error earlier in the log when the GamesNativeSDK is being initialized. One thing that is possible is you have an older version of the play services SDK. You can open the SDK Manager (Window > Google Play Games > Downloads > Google Play Games SDK (Android)). Make sure you have the latest version (it is in the "extras" section).

itsharshdeep commented 9 years ago

Hi @claywilkinson Sorry for late reply.I was away. Thanks a lot for you Help. Really great support you provide. :) It worked Really appreciable.