Это скрипт моих сервисов Google Play.Но когда я устанавливаю игру из магазина игр, выполняются такие функции, как вход в систему, и все не работает.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GooglePlayGames;
using GooglePlayGames.BasicApi;
using UnityEngine.SocialPlatforms;
public class playconsole : MonoBehaviour
{
public static playconsole play;
void Awake()
{
play = this;
DontDestroyOnLoad(gameObject);
}
private void Start()
{
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
.EnableSavedGames()
.RequestEmail()
.RequestServerAuthCode(false)
.RequestIdToken()
.Build();
PlayGamesPlatform.InitializeInstance(config);
// recommended for debugging:
PlayGamesPlatform.DebugLogEnabled = true;
// Activate the Google Play Games platform
PlayGamesPlatform.Activate();
SignIn();
}
private void SignIn()
{
Social.localUser.Authenticate((bool success) =>
{
if (success)
{
Debug.Log("Signed into Google Play Services");
}
else
{
Debug.Log("Unable to sign into Google Play Services");
}
});
}
#region Achievements
public void UnlockAchievement(string Id)
{
Social.ReportProgress(Id, 30.0f, (bool success) => {
});
Social.ReportProgress(Id, 60.0f, (bool success) => {
});
Social.ReportProgress(Id, 90.0f, (bool success) => {
});
}
public void ShowAchievements()
{
Social.ShowAchievementsUI();
}
#endregion
#region Leaderboard
public void AddScoreTotheLeaderboard(long score, string leaderboardId)
{
Social.ReportScore(score, leaderboardId, (bool success) =>
{
});
}
public void ShowLeaderboard()
{
Social.ShowLeaderboardUI();
}
#endregion
}
При каждом открытии игры на телефоне отсутствует идентификатор электронной почты, связывающий всплывающие сообщения, а также достижения и функции списка лидеров.не работает