0
내가 개발 한 게임에 Google 플레이 서비스를 제공하려고합니다. 다음은 내 메인 화면에있는 스크립트입니다. 나는 전혀 응답을 얻지 못한다. 나는 모든 다른 SHA1 코드를 시도하고 무엇이 잘못되었는지 확신하지 못한다. 어떤 아이디어 ???Unity Google Play 서비스
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GooglePlayGames;
using UnityEngine.UI;
using GooglePlayGames.BasicApi;
using UnityEngine.SocialPlatforms;
public class GPS_Main : MonoBehaviour {
private bool IsConnectedToGoogleServices;
public Text SignIn;
private void Awake()
{
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();
PlayGamesPlatform.InitializeInstance(config);
PlayGamesPlatform.Activate();
}
// Use this for initialization
void Start() {
LogIn();
}
// Update is called once per frame
void Update() {
}
void LogIn()
{
Social.localUser.Authenticate(success => { });
}
public bool ConnectToGoogleServices()
{
if (!IsConnectedToGoogleServices)
{
Social.localUser.Authenticate((bool success) =>
{
IsConnectedToGoogleServices = success;
});
}
return IsConnectedToGoogleServices;
}
public static void ToAchievementUI()
{
if (Social.localUser.authenticated)
{
Social.ShowAchievementsUI();
}
else
{
Debug.Log("Not authenticated");
}
}
}
이것은 정말 짜증나는 사건이었습니다. 나는 많은 비디오와 책을 통해 올바른 문제를 찾아 왔습니다.