예제 #1
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");
        //}
    }
    private void Awake()
    {
        singleTonGooglePlayMenu = this;

        if (gpm == null)
        {
            gpm = Behaviour.FindObjectOfType <GooglePlayManager>();

            gpm.MenuManager = this;
        }

        if (_LoadingManager == null)
        {
            _LoadingManager = Behaviour.FindObjectOfType <LoadingManager>();
        }

        OnCheckingGooglePlayUser();
    }