play-games-plugin-for-unity icon indicating copy to clipboard operation
play-games-plugin-for-unity copied to clipboard

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

Open hankuk1592 opened this issue 2 years ago • 14 comments

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

  • Unity version: 2020.3.30f1
  • Google Play Games Plugin for Unity version: 0.11.01

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

hankuk1592 avatar Apr 13 '22 15:04 hankuk1592

same here deleted folder and installed the older version

nightw0lv avatar Apr 17 '22 14:04 nightw0lv

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

jbattersby-gg avatar Apr 18 '22 13:04 jbattersby-gg

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

jzapdot avatar Apr 19 '22 20:04 jzapdot

Gotta use the new functions

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

SolanoMauri avatar Apr 20 '22 20:04 SolanoMauri

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

jzapdot avatar Apr 20 '22 20:04 jzapdot

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.

SolanoMauri avatar Apr 20 '22 21:04 SolanoMauri

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.

nightw0lv avatar Apr 21 '22 12:04 nightw0lv

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

leonard4 avatar Apr 22 '22 04:04 leonard4

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

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

});

JannickLeismann avatar Apr 25 '22 07:04 JannickLeismann

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 avatar Apr 29 '22 14:04 DerBernie

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

DerBernie avatar Apr 30 '22 19:04 DerBernie

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

xxluky avatar Feb 13 '23 12:02 xxluky

There is no documentation? newbie here

an-one avatar Mar 24 '23 07:03 an-one

No documentation. This upgrade is complete garbage

XaguStudios avatar Jun 23 '23 08:06 XaguStudios