【发布时间】:2015-06-30 09:05:01
【问题描述】:
我正在尝试简单地登录到 google play 游戏服务并获得成就。这是代码:
using UnityEngine;
using System.Collections;
using GooglePlayGames;
using UnityEngine.SocialPlatforms;
public class Achievements : MonoBehaviour {
public static string testAch = " CgkI0PrljMcBEAIQAQ";
public static string testIncrAch = "CgkI0PrljMcBEAIQAg";
// Use this for initialization
void Start () {
if (Application.platform == RuntimePlatform.Android)
{
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate();
Social.localUser.Authenticate((bool success) =>
{
if (success)
{
Debug.Log("Successes on login to google play games");
Social.ReportProgress(testAch, 100, (bool successAch) =>
{
//Ach unlocked
Debug.Log("tEST AHC UNLOCKED");
});
}
else { Debug.Log("Login to google play games failed"); }
});
Social.ShowAchievementsUI();
}
}
// Update is called once per frame
void Update () {
}
}
我收到以下错误代码:调试:启动身份验证转换。 OP:SIGN_IN 状态:ERROR_TIMEOUT。它尝试了两次,但身份验证失败。任何想法为什么会发生这种情况。我很确定我在开发者控制台中正确设置了它。
【问题讨论】:
标签: c# android unity3d google-play-games