public void OnCheckingGooglePlayUser()
    {
        _LoadingManager.LoadingScreen(true);

        if (PlayGamesPlatform.Instance.localUser.authenticated)
        {
            DisplayInfo.text = "You have already logged on";

            GooglePlaySignIn.gameObject.SetActive(false);

            LoginPanelInfo.SetActive(true);

            gpm.GetUserInfos();

            gpm.DebugMaster.OnDebugging("You have already logged on");
        }
        else
        {
            DisplayInfo.text = "You have not log in";

            gpm.DebugMaster.OnDebugging("You have not log in");
        }

        _LoadingManager.LoadingScreen(false);
    }
    IEnumerator DelayChangeScene(int SceneInt)
    {
        LM.LoadingScreen(true);

        yield return(new WaitForSeconds(5f));

        SceneManager.LoadScene(SceneInt, LoadSceneMode.Single);

        LM.LoadingScreen(false);
    }
示例#3
0
    private void Awake()
    {
        _LoadManager.LoadingScreen(true);

        if (MenuManager == null)
        {
            MenuManager = FindObjectOfType <GoogleMainMenuManager>();
        }

        if (_NoticeManage == null)
        {
            _NoticeManage = NoticeManager.SingleTonyStark;
        }

        singletonGooglePlay = this;

        if (!PlayGamesPlatform.Instance.localUser.authenticated)
        {
            PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();

            PlayGamesPlatform.InitializeInstance(config);

            PlayGamesPlatform.Activate();

            PlayGamesPlatform.DebugLogEnabled = true;
        }

        if (Application.platform == RuntimePlatform.Android)
        {
            print("Android");

            if (PlayerPrefs.HasKey(GoogleSignInTracking))
            {
                DebugMaster.OnDebugging(" Old player - Account found!");

                TestAuthLogin();
            }
            else
            {
                DebugMaster.OnDebugging(" New player - No login records found!");
            }
        }
        //else if (Application.platform == RuntimePlatform.IPhonePlayer)
        //{
        //    print("Iphone");
        //}
        //else
        //{
        //    print("Editor");
        //}
    }