所以我想在我的 Unity3D 游戏中实现 GooglePlayGames 服务,但是每次我从我的 android 设备打开我的游戏时,它都会弹出 google play 游戏加载 Logo ,并且每次都会发生这种情况。我也无法打开排行榜和成就 UI。我已经在开发者控制台和我的项目中设置了所有内容。我已将我的电子邮件添加为测试人员。这是我的代码:
这是附在我的相机上的脚本
using UnityEngine;
using System.Collections;
using GooglePlayGames;
using UnityEngine.SocialPlatforms;
public class GooglePlayGamesScript : MonoBehaviour {
// Use this for initialization
void Awake () {
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate();
}
// Update is called once per frame
void Start () {
if(!Social.localUser.authenticated){
Social.localUser.Authenticate((bool success) => {
Debug.Log("Authenticating");
});
}
}
}
在这里我尝试报告分数:
Social.ReportScore(AddPoints.HighScore,"770479155009",
(bool success) => {
Debug.Log("reporting score");
});
如果有人知道是什么原因造成的,请告诉我。
另外我应该提到我的游戏没有发布。
最佳答案
发生这种情况是因为您的用户从未通过身份验证。可能有几个原因。这是我自己之前遇到过的一对。
关于c# - 每次启动我的应用程序时都会弹出 GooglePlayGames 加载 Logo ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32024659/