- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我想在 Android 和 IOS 中访问玩家头像,我可以使用 Social Class 获取用户 ID 和用户名,但图像总是返回 null!!
if ( Social.localUser.authenticated && Social.localUser.image != null )
{
Material m = new Material(Shader.Find("Unlit/Transparent Colored"));
m.mainTexture = Social.localUser.image;
AvatarImage.material = m;
}
任何想法。
最佳答案
Social API在 Unity 中仅针对 iOS 实现。
对于 Google Play 服务,我强烈建议购买 prime31 Google Play Game Services Plugin 75 美元。
或者还有一个开源 Play Games Unity Plugin来自 Google,但我不推荐它,因为如果没有登录错误,我无法正确集成它。
更新 1
Social.localUser.image
的 Play Games Unity Plugin 的实现总是返回 null。 see PlayGamesUserProfile.cs
关于android - Social.localUser.Image 在 Unity3d 中返回 null,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25238474/
考虑以下代码: $params = @{ Name = 'testUser1' Password = (ConvertTo-SecureString '3' -As
我有这一行: outputtext = Path.GetDirectoryName(Application.LocalUserAppDataPath) + "\\outputtext"; 这一行包含:
我正在尝试将 Google Play 服务添加到我的 Android 应用中。当我在 Unity Editor 中调用 Social.localUser.Authenticate 时,它向回调函数返回
我一直在关注this guide尝试编写一个 powershell 脚本来将新的本地用户添加到 Windows。 我需要用户名、全名、描述和密码,并检查 PasswordNeverExpires 和
我正在使用 Unity 以及在此处找到的适用于 Unity 的 Google Play 服务插件:https://github.com/playgameservices/play-games-plug
我想在 Android 和 IOS 中访问玩家头像,我可以使用 Social Class 获取用户 ID 和用户名,但图像总是返回 null!! if ( Social.localUser.authe
有互联网连接 一切都完美无缺。不存在导致崩溃的内存问题。 没有互联网连接 应用程序进入菜单屏幕,最终由于内存不足而崩溃。 我断定问题出在下面这行代码 Social.localUser.Authenti
我一直在将 unity 2017.4 更新到 2019.4 并将我的游戏构建到 ios。问题是更改 Social.localuser.id 类型,以“G:xxxxx”开头为“T:xxxxxx”。我搜索
运行脚本时,我有一行来验证我们的应用程序的“服务帐户”(又名本地用户帐户)是否存在: $svcAccountName = "TheAccountName" $svcAccount = Get-Loca
您好:我一直在努力让我的应用程序进行身份验证。我已将 APK 部署到我的 Galaxy 并发生以下情况:Unity 游戏打开,出现“连接到...”对话框,出现“Google Play”绿色对话框,对话
Google Play 服务的 Unity3d 代码。我正在使用 GooglePlayGamesPlugin-0.9.36 和 Unity 5.4 using UnityEngine; usi
我是一名优秀的程序员,十分优秀!