2

I downloaded the play games unity plugin from this link : https://github.com/playgameservices/play-games-plugin-for-unity

I am trying to import the plugin into my Unity project as of now and this is the current MainGui.cs code below:

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);
});

When I run this, I always get mStatusText as "LoadFriends fail...". I am unable to understand what could be causing the issue here.

1 Answer 1

0

The function LoadFriends() is not yet implemented as you can see here in the source.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.