I am building a game for Android with Unity 5, and I have imported this plugin
But it's not working properly I followed this tutorial :
When I try to post or show leaderboard , it does not show anything .It does not even throw any error. Sign-in and out are working properly.Please help
Code :
public void LogIn ()
{
Social.localUser.Authenticate ((bool success) =>
{
if (success) {
Debug.Log ("Login Sucess");
} else {
Debug.Log ("Login failed");
}
});
}
public void LogOut ()
{
PlayGamesPlatform.Instance.SignOut ();
}
public void Post ()
{
if (Social.localUser.authenticated) {
Social.ReportScore (5000, LeaderbordId, (bool success) =>
{
if (success) {
((PlayGamesPlatform)Social.Active).ShowLeaderboardUI (LeaderbordId);
} else {
Debug.Log ("Add Score Fail");
}
});
}
}
public void ShowLeader ()
{
Social.ShowLeaderboardUI ();
}