I'm using Google Services for leaderboard in my game. It's not authenticate on start, should show leaderboard by clicking on button, but it's not showing anything. How I could solve it?
My authenticate script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GooglePlayGames;
using GooglePlayGames.BasicApi;
using UnityEngine.SocialPlatforms;
public class Auth : MonoBehaviour
{
public static PlayGamesPlatform platform;
private void Start() {
if (platform == null) {
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();
PlayGamesPlatform.InitializeInstance(config);
PlayGamesPlatform.DebugLogEnabled = true;
platform = PlayGamesPlatform.Activate();
}
Social.Active.localUser.Authenticate(succes => {
if (succes) {
Debug.Log("ENTER GOOGLE SERVICES");
}
});
}
}
Leaderboard button script
using UnityEngine;
using GooglePlayGames;
using GooglePlayGames.BasicApi;
using UnityEngine.SocialPlatforms;
public class Lead : MonoBehaviour
{
private const string leaderboard = "Cg******";
public void OpenLead() {
Social.ReportScore(14, leaderboard, (bool succes) => {
if (succes) {
Debug.Log("SUCCESFUL ADDED");
}
});
Social.ShowLeaderboardUI();
}
}
I also saw a lot of this questions on the internet, but it's didn't help. I use latest play-games-plugin-for-unity, also tried
PlayGamesPlatform.Instance.ShowLeaderboardUI(leaderboard);
and
if ((((PlayGamesLocalUser) Social.localUser).Email != null) || (((PlayGamesLocalUser) Social.localUser).Email != ""))