gpt4 book ai didi

android - 显示成就UI();不想出现在 Android 上

转载 作者:行者123 更新时间:2023-12-04 18:06:06 26 4
gpt4 key购买 nike

我用的是官方PlayGameServices plugin for Unity,一直跟着安装到点。身份验证似乎很有效,但是当我想执行 ShowAchievementsUI(); 时,没有任何反应。没有 UI,没有错误,没有崩溃。

我在谷歌上搜索了一段时间,似乎其他人也遇到过这个问题,但看不到解决方案。

我现在的代码是:

using GooglePlayGames;
using UnityEngine.SocialPlatforms;

void Start() {
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate();
LoginSocialGamecenter();
}


public static void LoginSocialGamecenter() {
if (Social.localUser.authenticated) {
Social.ShowAchievementsUI (); Debug.Log("Pancakes!");
return;
}
}

还有“煎饼!”结果很完美。首次安装时的身份验证 UI 也能很好地显示。它在我拥有的所有设备上都失败了,但调试消息在 Android 上完美显示。

根据文档,它应该像描述的那样工作:

显示成就界面

To show the built-in UI for all leaderboards, call Social.ShowAchievementsUI.

using GooglePlayGames;
using UnityEngine.SocialPlatforms;
...
// show achievements UI
Social.ShowAchievementsUI();

This will show a standard UI appropriate for the look and feel of the platform (Android or iOS).

最佳答案

Akhil做对了。需要有五个以上的成就,否则窗口不会出现。

它不会对此做出任何错误报告,只需返回 false。

关于android - 显示成就UI();不想出现在 Android 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26300803/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com