Google 加上 LoadFriends 失败
Google Plus LoadFriends fail
我从这个 link 下载了 play games unity plugin
: https://github.com/playgameservices/play-games-plugin-for-unity
我现在正在尝试将插件导入到我的 Unity 项目中,这是下面当前的 MainGui.cs
代码:
Social.localUser.Authenticate((bool success) => {
mWaitingForAuth = false;
if (success) {
mStatusText = "Welcome " + Social.localUser.userName + ","+Social.localUser.id;
Social.localUser.LoadFriends((bool s) => {
if(s) {
foreach(IUserProfile p in Social.localUser.friends){
mStatusText += "\n" + p.id + "," + p.userName;
}
mStatusText += "\nLoadFriends success...";
}
else
mStatusText += "\nLoadFriends fail...";
});
} else {
mStatusText = "Authentication failed.";
}
Debug.Log (mStatusText);
});
当我 运行 这个时,我总是得到 mStatusText
作为 "LoadFriends fail..."。我无法理解是什么导致了这里的问题。
功能LoadFriends()
尚未实现,如您所见here in the source.
我从这个 link 下载了 play games unity plugin
: https://github.com/playgameservices/play-games-plugin-for-unity
我现在正在尝试将插件导入到我的 Unity 项目中,这是下面当前的 MainGui.cs
代码:
Social.localUser.Authenticate((bool success) => {
mWaitingForAuth = false;
if (success) {
mStatusText = "Welcome " + Social.localUser.userName + ","+Social.localUser.id;
Social.localUser.LoadFriends((bool s) => {
if(s) {
foreach(IUserProfile p in Social.localUser.friends){
mStatusText += "\n" + p.id + "," + p.userName;
}
mStatusText += "\nLoadFriends success...";
}
else
mStatusText += "\nLoadFriends fail...";
});
} else {
mStatusText = "Authentication failed.";
}
Debug.Log (mStatusText);
});
当我 运行 这个时,我总是得到 mStatusText
作为 "LoadFriends fail..."。我无法理解是什么导致了这里的问题。
功能LoadFriends()
尚未实现,如您所见here in the source.