2017-04-02 4 views
0

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 이상을 사용해 보았습니다.

는 또한 이러한 메시지를 얻을 : Unity console

그리고 나는 SDK 관리자에서 모든 모든 necesary 패키지를 설치했다.

답변

0

그래, 나처럼 답답한 사람들은 \ Assets \ Plugins \ Android \ 10.2.1 버전의 모든 파일을 제거하고 버전 10.0.1 파일로 대체하는 것이 좋습니다.

출처 : 한마디로 https://github.com/playgameservices/play-games-plugin-for-unity/issues/1604

: 플레이 게임 플러그인이 새로운 라이브러리와 호환되지 않습니다.

또 다른 관련 스레드 : http://answers.unity3d.com/questions/1324988/android-game-crashes-on-startup-becaus-of-google-p.html

편집 : 만 유니티 버전 5.0-5.5이 (지금) 지원