Unity Social.LoadUsers Problem on Game Center IOS

Unity Editor Version : 2019.4.28f1

Hi. Same system works fine on android but I have problem on IOS.

        ILeaderboard mLeaderBoard = Social.CreateLeaderboard();
        mLeaderBoard.id = "leaderboardID";
        mLeaderBoard.userScope = UserScope.Global;
        mLeaderBoard.timeScope = TimeScope.AllTime;
        mLeaderBoard.range = new Range(1, 30);

        mLeaderBoard.LoadScores(result =>
        {
            if (result)
            {
                Debug.Log("Scores Length : " + mLeaderBoard.scores.Length); //Output : "Scores Length : 30"

                List<string> userIDs = new List<string>();

                for (int i = 0; i < mLeaderBoard.scores.Length; i++)
                    userIDs.Add(mLeaderBoard.scores[i].userID);

                Debug.Log("UserIDs Count : " + userIDs.Count); //Output : "UserIDs Count : 30"
                Debug.Log("UserID[0] : " + userIDs[0]); //Output : "UserID[0] : 162334654......"
                Debug.Log("Player ID : " + Social.localUser.id); //Output : "Player ID : T:_9953b2d1m32......"

                Social.LoadUsers(userIDs.ToArray(), (users) =>
                {
                    Debug.Log("Users Length : " + users.Length); //Output : "Users Length : 0"
                });
            }
        });

Although 30 Scores are returned, users information is not loaded. Social.LoadUsers function returns user array of length is 0.
It also gives the following error in XCode Console :

I noticed here that the userID of the users on the leaderboard are not similar to Social.localuser.id. Different types. So I tried using Social.LoadUsers function with Social.localuser.id

        List<string> userIDs = new List<string>();
        userIDs.Add(Social.localUser.id);

        Social.LoadUsers(userIDs.ToArray(), (users) =>
        {
            Debug.Log("Users Length : " + users.Length); //Output : "Users Length : 0"
        });

But the result is the same. Social.LoadUsers function returns 0. But this time it didn’t give any error in XCode Console.

Up

Any success with this?

version Version ‘2020.3.3f1 (76626098c1c4)’ works for me so the fix in Fixed in 2020.3.6f1 probably ruined something

(You should try a version before the fix in 2019.4.25f1 if you want to use 2019)

There is no solution yet.

Unity opened a bug, please vote it up: https://issuetracker.unity3d.com/is…retrieve-users-using-the-new-score-dot-userid

1 Like

I tried on Unity 2019.4.31f1, the issue still continues.

Reproduced with 2020.3.21f1. Any news or plans to fix this issue? This is currently the only issue that holding me from using the Social module. Android works perfectly.

This is still an issue in 2022.3.16f1.

Ben

I mean Social API is going to be deprecated, I doubt they are going to fix or add anything to it.