Modifying post after some great help updated code and tried to provide longcat(I filtered with the word “unity” seemed to work, but not sure that that was the correct option as im new to android debugging). also the crash log i filtered with the app name, seemed to get more items that way. I would also like to add that Login to google is successfull, and achivements and IAP work, only issue is the leaderboard crashing the game.
Honestly not sure what im doing wrong any help would be appreciated. I have gotten references from google play console, have all of the google play items from sdk manager. my game authenticates users just fine, but when i use the following code the game crashes as soon as i click the show leaderboard button… do i have something wrong with my code or any suggestions on how to trouble shoot this? Its ShowGLeaderboard() that causes the issue.
i have this at the top:
using GooglePlayGames;
using UnityEngine.SocialPlatforms;
using GooglePlayGames.BasicApi;
this is my code to sign into google in my start function:
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder ().Build ();
PlayGamesPlatform.InitializeInstance (config);
// recommended for debugging:
PlayGamesPlatform.DebugLogEnabled = true;
// Activate the Google Play Games platform
PlayGamesPlatform.Activate ();
LogInToGoogle ();
function to sign into google:
// Google Play Services
public void LogInToGoogle()
{
Social.localUser.Authenticate((bool success) =>
{
if (success)
{
LoggedInToGoogle = true;
Debug.Log("Signed Into Google");
}
else
{
LoggedInToGoogle = false;
Debug.Log("Signed Into Google Failed");
}
});
}
Function to show leaderboard:
public void ShowGLeaderboard()
{
PlayGamesPlatform.Instance.ShowLeaderboardUI ("CgkI96qIrZYMEAIQBg");
}
[91750-dwcrash.txt|91750]