playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.44k stars 959 forks source link

How to remove all the console messages that loads during compile? #3017

Open Shadowing1983 opened 3 years ago

Shadowing1983 commented 3 years ago

On every single compile i get tons of messages in my console. How do I disable that? I've decided to stop trying to make this plug in work. Totally gave up on it. Going to wait till I upgrade to Unity 2019 and try again I guess. Never could get it to return a server auth code. Whats really odd is I had it signing in but now it doesn't even sign in.

`public LoginManager loginManager; public GameObject LoginTypeMenu; public GameObject GoogleLoginPanel;

public GameObject LoggingIn;
public Text LoadingMessage;

private void OnEnable(){
    LoadingMessage.gameObject.SetActive(false);

    #if UNITY_ANDROID

        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
        .RequestServerAuthCode(false)
        .RequestIdToken()
        .Build();

        //DEBUGGING ONLY
        PlayGamesPlatform.DebugLogEnabled = true;

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.Activate();

    #endif
}

public void SignInwithGoogleButton() {

    SignInWithGoogle();
}

private void SignInWithGoogle(){

    #if UNITY_ANDROID

         Social.localUser.Authenticate((result) =>{

             if (result) {

                string authCode = PlayGamesPlatform.Instance.GetServerAuthCode();

                LoadingMessage.text = "Google Log In Successful " + authCode;
                ES3.Save<string>(Setting.PlatformAutoLogin.ToString(), authCode,GameSettings.SettingsFileName);
                LoginManager.platform_auto_login = authCode;

                LoggingIn.SetActive(true);
                loginManager.PlatformLogin(AccountType.Google);
                 LoadingMessage.gameObject.SetActive(true);
                GoogleLoginPanel.SetActive(false);

             } else {

                LoadingMessage.text = "Google Log In Failed";
                LoggingIn.gameObject.SetActive(false);
                ES3.Save<string>(Setting.PlatformAutoLogin.ToString(), string.Empty,GameSettings.SettingsFileName);
                LoginManager.platform_auto_login = string.Empty;
                 LoadingMessage.gameObject.SetActive(true);
                GoogleLoginPanel.SetActive(false);
                LoginTypeMenu.SetActive(true);

             }

        });

    #endif
}

`