- Home /
Did Social.LoadUsers() stop working?
Social.LoadUsers() used to work for me, but now the callback doesn't even get called. It used to work for me previously but now nothing happens. I'm using Unity3d 5.3.1 and Xcode 7.2. I know the function gets called, the local user is logged into GameCenter and the userID array contains userIDs.
The relevant code:
if (userIDs == null || userIDs.Length != scores.Length) {
userIDs = new string[scores.Length];
}
for (int i = 0; i < scores.Length; i++) {
userIDs[i] = scores[i].userID;
}
Debug.Log ("request user names");
Debug.Log (Social.localUser.authenticated);
Social.LoadUsers(userIDs, users => {
Debug.Log(users.Length);
Debug.Log(scores.Length);
for (var i = 0; i < users.Length; i++) {
Debug.Log(users[i].userName);
}
if (users.Length == scores.Length) {
Debug.Log("!! sending scores out " + scores.Length.ToString());
if (request.function != null) {
request.function (scores, users, request.chunk, request.from);
}
}
});
Running this outputs the following into the Xcode console:
userIds ("G:" and some numbers)
"request user names"
"True"
I'm having the same issue here, not working anymore on iOS since I upgraded to 5.3.1 :( The callback you provide to Social.LoadUsers is simply... not called!
Hope this get fixed quickly!
This is an issue for me as well. Finally got things to build successfully after upgrading from 5.2.4f1 and, damn it, Social.LoadUsers is not working.
Using Unity 5.3.2p2.
Same issue, callback function not called, very frustrating.
Answer by arkon · Feb 19, 2016 at 01:13 PM
Not working for me either on 5.3.2.P3 I was just about to release the game too and it's just stopped me being able to. Anyone know if unity are even aware of it as a problem?
Haven't seen any acknowledgement from unity $$anonymous$$m about it either, but there's a forum thread over here for those following this issue: http://forum.unity3d.com/threads/no-callback-on-social-loadusers-for-ios-5-3-1-5-4-0b2.379867/
Probably wouldn't hurt to add a comment there as well.
Answer by EpicWolffe · Oct 30, 2020 at 06:09 PM
Ran into the same problem! It was working, then I messed around with the packages and a few other things in the developer console. I couldn't tell you what broke it... BUT
What ended up finally giving me data again in Loadusers was by calling it from PlayGamesPlatform.Instance.LoadUsers... like so. It was called inline from within the Loadscores method.
PlayGamesPlatform.Instance.LoadUsers(userIds.ToArray(), (users) => {
Debug.Log(users.length); //will give you correct count
});
Your answer
Follow this Question
Related Questions
Game Center login issue 0 Answers
Social Api causing crashes 2 Answers
When will Social.ReportScore() fail? 0 Answers
GameCenterPlatform - Load leaderboards with custom parameters 1 Answer
How can I show a specific leaderboard in iOS GameCenter? 2 Answers