- Home /
Unity 2017.3 Game Center authentication bug
Hi guys. I just want to check if this happens to anyone else. So I have a scene that contains only a camera and a script attached that calls the Social.localUser.Authenticate() method in the Start() method. So on my ios device (iphone 4s) with game center turned off, if I open my app nothing happens. The login Game Center screen won't show up. It does sign me in into the account if I am logged in Game Center on the iPhone. The thing is it does enter the failed authentication condition because I added a Debug.Log there and it is displayed. I wanted to see what happened in Unity 2017.2 and it worked.. the sing me in UI would pop up immediately. I see that it also doesn't work on the 2018 beta. Can anyone confirm this happens to them in Unity 2017.3.1f1 or how could I prevent this from happening?
This is the script:
public class AuthenticateTest : MonoBehaviour {
// Use this for initialization
void Start ()
{
Social.localUser.Authenticate(success =>
{
if (success)
{
Debug.Log("Local user id: " + Social.localUser.id);
}
else
{
Debug.Log("Authentication failed");
}
});
}
}
Answer by Angelbast · Feb 26, 2018 at 04:13 PM
Hello :
Here is for you the solution : downgrade to Unity 2017.2. Here is the link to the issue I opened to Unity few weeks ago : https://issuetracker.unity3d.com/issues/ios-game-center-authentication-screen-is-not-being-displayed-when-calling-social-dot-localuser-dot-authenticate