playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.43k stars 952 forks source link

CS0246: The type or namespace name 'PlayGamesClientConfiguration' could not be found (are you missing a using directive or an assembly reference?) #3141

Open hankuk1592 opened 2 years ago

hankuk1592 commented 2 years ago

Describe the bug Total 4 errors. error CS0246: The type or namespace name 'PlayGamesClientConfiguration' could not be found (are you missing a using directive or an assembly reference?) error CS0117: 'PlayGamesPlatform' does not contain a definition for 'InitializeInstance' error CS0019: Operator '==' cannot be applied to operands of type 'bool' and 'SignInStatus' error CS1061: 'PlayGamesPlatform' does not contain a definition for 'SignOut' and no accessible extension method 'SignOut' accepting a first argument of type 'PlayGamesPlatform' could be found (are you missing a using directive or an assembly reference?)

Below is my full script. script.txt

Versions

I have no idea... I tried reinstalling the Plugin, re-import all, re-typed Android Configuration... Please help.

nightw0lv commented 2 years ago

same here deleted folder and installed the older version

jbattersby-gg commented 2 years ago

PlayGamesClientConfiguration is a requirement for Playfab authentication with Android users so this needs fixing ASAP

jzapdot commented 2 years ago

Just updated to latest and getting this error. Has this been deprecated in favor of something else?

SolanoMauri commented 2 years ago

Gotta use the new functions

https://github.com/playgameservices/play-games-plugin-for-unity/blob/master/UPGRADING.txt

jzapdot commented 2 years ago

What new functions? This mentions Authenticate, but it doesn't mention where the functionality previously present in PlayGamesClientConfiguration has moved to. For example, we used this configuration to enable using cloud save games. What new functionality/configuration is needed to accomplish the same outcome as the below snippet?

PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
    .EnableSavedGames()
    .Build();
PlayGamesPlatform.InitializeInstance(config);
SolanoMauri commented 2 years ago

Gotta use the new functions

https://github.com/playgameservices/play-games-plugin-for-unity/blob/master/UPGRADING.txt

Hm, I haven't used the those cloud save functions yet on a test project yet. Have you tried saving after a successful login and ensured cloud save is enabled on google play console for the application? Since, configurations aren't necessary anymore.

nightw0lv commented 2 years ago

serious plugins dont remove just like that functions on next updates, instead they deprecate them, this is just stupid I am removing it completely because I dont want in future this to happen again.

leonard4 commented 2 years ago

Seeing the same issue here from upgrading an old project from years ago. I haven't used GPG since then, would appreciate some help on how to fix this code to use the new style, I tried what was in the UPGRADING.txt but got errors about Authenticate not taking 1 arg, so I tried a callback, and still not coming up with a working solution. Thanks!

image

Trying to do PlayGamesPlatform.Instance.Authenticate(); like in UPGRADING.txt results in:

image

JannickLeismann commented 2 years ago

@leonard4 You need to provide a callback method as a parameter:

PlayGamesPlatform.Activate();
PlayGamesPlatform.Instance.Authenticate(delegate (SignInStatus status) {

});
DerBernie commented 2 years ago

Had to downgrade again, as I cannot specify the "profile" OAuth scope anymore (which is required for PlayFab): https://docs.microsoft.com/en-us/gaming/playfab/features/authentication/platform-specific-authentication/google-sign-in-unity#adding-google-sign-in-to-your-unity-game

DerBernie commented 2 years ago

There's a related post at PlayFab forums: https://community.playfab.com/questions/61120/googleoauthnoidtokenincludedinresponse-when-loggin.html

xxluky commented 1 year ago

Same here. Had to downgrade. At least there is any better manual to this step.

an-one commented 1 year ago

There is no documentation? newbie here

XaguStudios commented 1 year ago

No documentation. This upgrade is complete garbage