https://metaplay.io logo
The correct Google Sign-In Plugin to use
# questions-and-feedback
a
The docs at https://docs.metaplay.io/feature-cookbooks/social-logins/social-platform-google-sign-in.html point to https://github.com/googlesamples/google-signin-unity However that repo has not been touched in 6 years and is reportedly not working? Unity docs at https://docs.unity.com/ugs/en-us/manual/authentication/manual/platform-signin-google-play-games refer to a different thing, https://github.com/playgameservices/play-games-plugin-for-unity/tree/master/current-build which is updated 2 weeks ago. Which one would be the good lib to use? I'd prefer to get the normal Google auth, not the Play Games one, but i'm not sure whether that makes a difference here.
j
Google Sign-In and Play Games logins are different login platforms with different user ids. The library which is 6 years old should be a simple API wrapper for
com.google.android.gms:play-services-auth
library on android and
GoogleSignIn
cocoapod on ios, which both have had releases this year. Please let us know if there are issues with the library.
a
well, there seems to be an issue. when i installed the package from https://github.com/googlesamples/google-signin-unity/releases/tag/v1.0.4 I start getting conflicts from all code in the SDK sources which uses System.Threading.Tasks because now something has duplicate definitions for e.g. class Task in Unity.Tasks so i get these errors in MetaplaySDK/Client/Core/Tasks/MetaTask.cs and everywhere The type 'Task' exists in both 'Unity.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
hm i don't have such a folder .. but maybe i can delete the whole Parse thing which seems to include Unity.Tasks.dll
no, removing Parse did fix the duplicate Task definitions but now Firebase is not available MetaplaySDK/Client/Unity/DefaultIntegration/MetaplayClient.cs(188,13): error CS0103: The name 'Firebase' does not exist in the current context
j
Hmm, strange, did you try this? "Hi, I had the same problem. I deleted "Parse" folder and then again import custom package first google-signin-plugin package after that firebaseAuth package in this order, it helped me."
a
yes, then i still get that: MetaplaySDK/Client/Unity/DefaultIntegration/MetaplayClient.cs(188,13): error CS0103: The name 'Firebase' does not exist in the current context
i now tried with the different hint that told to disable the Auto Reference option for the parse DLLs in the unity inspector but now i get Failed to find entry-points: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Assembly-CSharp-Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' --->
i've done reimport all assets and now also deleted the Library folder etc.. hmhm
i try again that way that i'll delete the Parse DLLs they were also saying that one should keep the dotNet45 folder under Parse but i don't have that, i mean i never got that in the first place
hey now it works!
i added some debug code at one point to see where the Unity.Task class was loaded from so i think that was bugging for me later then now i just deleted the Parse folder altogether and restarted Unity and no probs anymore, phew
j
Alright, glad it works! Mysterious issues...
a
well in the end i think it's just that the package by Google is so old that it adds the duplicate Task implementation and then i made extra hassle for myself by having debug code in which failed when it was otherwise fixed, just by deleting the Parse stuff altogether i also did like in the instructions that reinstalled firebase lib after the sign-in but idk if it was necessary
pain continues, editor was happy now but iOS build complains: No type or protocol named 'GIDSignInDelegate' there are a couple of ways to fix explained in https://github.com/googlesamples/google-signin-unity/pull/205
those worked, i'm getting succesful login back to unity now on iOS (testing with that first) 🙂