Example #1
0
    protected override void OnEnable()
    {
        base.OnEnable();

        SOUND.I.Play(DEF.SND.popup_open);
        _btnInBox.interactable   = true;
        _btnFBLogin.interactable = true;

        if (USER.I.CurProfileTexture != null)
        {
            _imgPhoto.gameObject.SetActive(true);
            _imgPhoto.texture = USER.I.CurProfileTexture;
        }
        _textUserName.text   = USER.I.GetUserInfo().GetName();
        _textUserUID.text    = "UID : " + USER.I.GetUserInfo().GetId().ToString();
        _tgSounds.isOn       = PlayerPrefHelper.GetSoundOn();
        _tgNotification.isOn = PlayerPrefHelper.GetNofiOn();

        if (USER.I.IsGuestLogin)
        {
            _btnSignOut.gameObject.SetActive(false);
            _btnInBox.gameObject.SetActive(true);
            _btnFBLogin.gameObject.SetActive(true);
            _btnFBLogin.interactable = true;
        }
        else
        {
            _btnSignOut.gameObject.SetActive(true);
            _btnInBox.gameObject.SetActive(false);
            _btnFBLogin.gameObject.SetActive(false);
        }
    }