Everything in my game is running smoothly except for leaderboard integration. For some reason, every time I use the Social.localUser.Authenticate() function, the app crashes (note: I’ve only tested on iOS, not android). It’s as if connecting to the service is causing some sort of error. Could this be a problem with the Unity engine itself, or have I missed something? Documentation for the Social Api has been hard to come by, but I think my code should be working. Right now, I’m pretty much just using the code sample given in the docs. Here it is for reference:
void Start ()
{
Social.localUser.Authenticate (ProcessAuthentication);
}
void ProcessAuthentication (bool success) {
if (success) {
Debug.Log ("Authenticated, checking achievements");
}
else{
Debug.Log ("Failed to authenticate");
}
}
As you can see, I’m not even attempting to check achievements, load scores, show leaderboards, or anything else. I’m just trying to authenticate the local user, but it crashes. Is there anything I can do? If not, is there some sort of plugin I can use? Thanks in advance!