save/load Data to Google Play games -authentication failed
Hello guys !
I m developing an android Game .I'm using a real device for testing. The game uses Google Games Services. I 've been able to sign in , show achievements & leaderboard, add score to leaderboard, unlock achievements. saved game is ON in the google play console I used this plugin https://github.com/playgameservices/play-games-plugin-for-unity when I tried to implement the cloud save , I added this code Strat() & the app crashed
void Start ()
{
Debug.Log ("0");
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder ()
.EnableSavedGames () //app didn't crash when I commented this
.Build ();
Debug.Log ("1");
PlayGamesPlatform.InitializeInstance (config);
Debug.Log ("3");
PlayGamesPlatform.DebugLogEnabled = true;
Debug.Log ("4");
PlayGamesPlatform.Activate ();
Debug.Log ("5");
}
public void LogIn ()
{
Debug.Log ("6");
if (!Social.localUser.authenticated) {
Debug.Log ("7");
Social.localUser.Authenticate ((bool success) => { //the authentication does not work
if (success) {
Debug.Log ("8");
} else {
Debug.Log ("9");
}
});
Debug.Log ("10");
}
}
I used this plugin to see the logs in my device https://www.assetstore.unity3d.com/en/#!/content/12047
here is the log if I used .EnableSavedGames ()
the log if I commented .EnableSavedGames ()
Answer by koprivajakub · Sep 02, 2020 at 08:36 PM
Were you able to figure this out? I am having similar problem. I was able to make it work via signing the application from Android Studio.
Configuration of the SHA-1 keystore fingerprint needs to be in place in Google Play console.
But I am not able to make it work via Unity Cloud Build nor direct build of APK from Unity.
Your answer
![](https://koobas.hobune.stream/wayback/20220612110922im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
The best overloaded method match for google play games 1 Answer
A lot of newbie problems 1 Answer
Unity Build Error Duplicate class,Unity Build Error duplicate class 2 Answers
Seeing slow performance on play-games-plugin-for-unity OpenWithAutomaticConflictResolution 1 Answer
Cloud build with google play games give me an error 0 Answers