Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to connect google play services in unity

using GooglePlayGames;
private bool Authenticated;

public void Start() {
  PlayGamesPlatform.Instance.Authenticate(ProcessAuthentication);
}

internal void ProcessAuthentication(SignInStatus status) {
  if (status == SignInStatus.Success) {
    // Continue with Play Games Services
    Authenticated = true;
  } else {
    // Disable your integration with Play Games Services or show a login button
    // to ask users to sign-in. Clicking it should call
    // PlayGamesPlatform.Instance.ManuallyAuthenticate(ProcessAuthentication).
    Authenticated = false;
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #connect #google #play #services #unity
ADD COMMENT
Topic
Name
6+6 =