我从以下链接下载了play games unity pluginhttps://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 ...”。我无法理解是什么原因导致了此问题。

最佳答案

您可以看到here in the source.,尚未实现功能LoadFriends()

关于c# - Google Plus LoadFriends失败,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29912273/

10-13 06:20