c# - 每次启动我的应用程序时都会弹出 GooglePlayGames 加载 Logo

标签 c# unity3d google-play google-play-games

所以我想在我的 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");
});

如果有人知道是什么原因造成的,请告诉我。
另外我应该提到我的游戏没有发布。

最佳答案

发生这种情况是因为您的用户从未通过身份验证。可能有几个原因。这是我自己之前遇到过的一对。

  • 尝试在未发布的应用程序中运行 GPG。这是我几次出现问题的原因。在 Alpha channel 中上传构建,并确保您使用的 ID 是已批准测试人员列表的一部分。另外,不要忘记在 GPG 中发布游戏。
  • 如果您正在运行任何干扰 Play 服务的应用程序,请停止它们。一个让我非常悲伤的是自由。一般来说,只要停止任何可能使用 SU
  • 的东西

    关于c# - 每次启动我的应用程序时都会弹出 GooglePlayGames 加载 Logo ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32024659/

    相关文章:

    c# - 如何在 c# 或任何语言中使用 sita gabriel 的联络 API(LAPI)?

    为 Facebook 应用程序批准崩溃而构建的 iOS 模拟器

    bash - 命令行将APK上载到Google Play商店

    android-studio - 更改已托管的使用 java 构建的 android 应用程序以进行 flutter 和更新

    c# - IEnumerable<T> 是隐含的顺序相关性还是应该是明确的?

    c# - 尝试编译 ASPNetWebStack 获取 35MSSharedLib1024.snk 缺少私钥

    c# - 当不满足条件时,如何从 null linq 查询值中获取 0,然后将其设置为 ViewBag

    c# - 如何在 DOTween 中实现异步?

    c# - Unity麦克风无法正常工作

    android - 用于Android的music.api-HttpClient post()返回null