2d 게임을 단합하여 만들고 있는데 문제가 있습니다. Google Play 용 개발자 계정을 만들고 Google에 내 게임을 공개 된 알파로 게시했습니다. 게임에 Google Play 게임 서비스를 추가하고 있습니다. 최신 라이브러리를 (https://github.com/playgameservices/play-games-plugin-for-unity)에서 다운로드하여 Unity에 가져 왔습니다. 모든 것을 설정했지만 로그인을 시도하면 게임이 중단됩니다.Google Play 게임 서비스에 로그인하면 게임이 작동을 멈 춥니 다.
using UnityEngine;
using GooglePlayGames;
using GooglePlayGames.BasicApi;
using UnityEngine.SocialPlatforms;
using System.Collections;
public class gpgTest : MonoBehaviour {
void Start() {
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
// enables saving game progress.
.EnableSavedGames()
// require access to a player's Google+ social graph (usually not needed)
.RequireGooglePlus()
.Build();
PlayGamesPlatform.InitializeInstance(config);
// recommended for debugging:
PlayGamesPlatform.DebugLogEnabled = true;
// Activate the Google Play Games platform
PlayGamesPlatform.Activate();
}
void Update() {
}
public void LogIn()
{
Debug.Log("button");
// authenticate user:
Social.localUser.Authenticate((bool success) => {
// handle success or failure
});
}
}
참고 : 거의 모든 버전의 라이브러리와 다른 버전의 Unity 5.0 이상을 사용해 보았습니다.
그리고 나는 SDK 관리자에서 모든 모든 necesary 패키지를 설치했다.