public void SaveOptions()
 {
     PlayerPrefs.SetInt("GameName.AnisoTropic", this.CurrentAS);
     PlayerPrefs.SetInt("GameName.AntiAliasing", this.CurrentAA);
     PlayerPrefs.SetInt("GameName.BlendWeight", this.CurrentBW);
     PlayerPrefs.SetInt("GameName.QualityLevel", this.CurrentQuality);
     PlayerPrefs.SetInt("GameName.ResolutionScreen", this.CurrentRS);
     PlayerPrefs.SetInt("GameName.VSyncCount", this.CurrentVSC);
     PlayerPrefs.SetInt("GameName.AnisoTropic", this.CurrentAS);
     PlayerPrefs.SetInt("GameName.TextureLimit", this.CurrentTL);
     PlayerPrefs.SetInt("GameName.ShadowCascade", this.CurrentSC);
     PlayerPrefs.SetFloat("GameName.Volumen", this._volumen);
     PlayerPrefs.SetFloat("GameName.ShadowDistance", this.cacheShadowDistance);
     PlayerPrefs.SetInt("GameName.ShadowProjection", !this.shadowProjection ? 0 : 1);
     PlayerPrefs.SetInt("GameName.ShowFPS", !this._showFPS ? 0 : 1);
     PlayerPrefs.SetInt("GameName.PauseAudio", !this._isPauseSound ? 0 : 1);
     PlayerPrefs.SetInt("GameName.ResolutionMode", !this.useFullScreen ? 0 : 1);
     PlayerPrefs.SetInt("GameName.ShadowEnable", AllOptionsKeyPro.BoolToInt(this._shadowEnable));
     PlayerPrefs.SetFloat("GameName.Brightness", this._brightness);
     PlayerPrefs.SetInt("GameName.RealtimeReflection", AllOptionsKeyPro.BoolToInt(this._realtimeReflection));
     PlayerPrefs.SetFloat("GameName.LoadBias", this._lodBias);
     PlayerPrefs.SetFloat("GameName.HudScale", this._hudScale);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Save all options for load in a next time
 /// </summary>
 public void SaveOptions()
 {
     PlayerPrefs.SetInt(AllOptionsKeyPro.AnisoTropic, CurrentAS);
     PlayerPrefs.SetInt(AllOptionsKeyPro.AntiAliasing, CurrentAA);
     PlayerPrefs.SetInt(AllOptionsKeyPro.BlendWeight, CurrentBW);
     PlayerPrefs.SetInt(AllOptionsKeyPro.Quality, CurrentQuality);
     PlayerPrefs.SetInt(AllOptionsKeyPro.Resolution, CurrentRS);
     PlayerPrefs.SetInt(AllOptionsKeyPro.VsyncCount, CurrentVSC);
     PlayerPrefs.SetInt(AllOptionsKeyPro.AnisoTropic, CurrentAS);
     PlayerPrefs.SetInt(AllOptionsKeyPro.TextureLimit, CurrentTL);
     PlayerPrefs.SetInt(AllOptionsKeyPro.ShadowCascade, CurrentSC);
     PlayerPrefs.SetFloat(AllOptionsKeyPro.Volumen, _volumen);
     PlayerPrefs.SetFloat(AllOptionsKeyPro.ShadowDistance, cacheShadowDistance);
     PlayerPrefs.SetInt(AllOptionsKeyPro.ShadownProjection, (shadowProjection) ? 1 : 0);
     PlayerPrefs.SetInt(AllOptionsKeyPro.ShowFPS, (_showFPS) ? 1 : 0);
     PlayerPrefs.SetInt(AllOptionsKeyPro.PauseAudio, (_isPauseSound) ? 1 : 0);
     PlayerPrefs.SetInt(AllOptionsKeyPro.ResolutionMode, (useFullScreen) ? 1 : 0);
     PlayerPrefs.SetInt(AllOptionsKeyPro.ShadowEnable, AllOptionsKeyPro.BoolToInt(_shadowEnable));
     PlayerPrefs.SetFloat(AllOptionsKeyPro.Brightness, _brightness);
     PlayerPrefs.SetInt(AllOptionsKeyPro.RealtimeReflection, AllOptionsKeyPro.BoolToInt(_realtimeReflection));
     PlayerPrefs.SetFloat(AllOptionsKeyPro.LodBias, _lodBias);
     PlayerPrefs.SetFloat(AllOptionsKeyPro.HUDScale, _hudScale);
     ShowMenu();
 }
Exemplo n.º 3
0
    /// <summary>
    ///
    /// </summary>
    void LoadAndApply()
    {
        bl_Input.Instance.InitInput();
        CurrentAA      = PlayerPrefs.GetInt(AllOptionsKeyPro.AntiAliasing, DefaultAntiAliasing);
        CurrentAS      = PlayerPrefs.GetInt(AllOptionsKeyPro.AnisoTropic, DefaultAnisoTropic);
        CurrentBW      = PlayerPrefs.GetInt(AllOptionsKeyPro.BlendWeight, DefaultBlendWeight);
        CurrentQuality = PlayerPrefs.GetInt(AllOptionsKeyPro.Quality, DefaultQuality);
        CurrentRS      = PlayerPrefs.GetInt(AllOptionsKeyPro.Resolution, DefaultResolution);
        CurrentVSC     = PlayerPrefs.GetInt(AllOptionsKeyPro.VsyncCount, DefaultVSync);
        CurrentTL      = PlayerPrefs.GetInt(AllOptionsKeyPro.TextureLimit, 0);
        CurrentSC      = PlayerPrefs.GetInt(AllOptionsKeyPro.ShadowCascade, 0);
        _showFPS       = (PlayerPrefs.GetInt(AllOptionsKeyPro.ShowFPS, 0) == 1) ? true : false;
        _volumen       = PlayerPrefs.GetFloat(AllOptionsKeyPro.Volumen, 1);
        float sd = PlayerPrefs.GetFloat(AllOptionsKeyPro.ShadowDistance, DefaultShadowDistance);

        shadowProjection = (PlayerPrefs.GetInt(AllOptionsKeyPro.ShadownProjection, 0) == 1) ? true : false;
        PauseSound((PlayerPrefs.GetInt(AllOptionsKeyPro.PauseAudio, 0) == 1 ? true : false));
        useFullScreen       = (PlayerPrefs.GetInt(AllOptionsKeyPro.ResolutionMode, 0) == 1) ? true : false;
        _shadowEnable       = AllOptionsKeyPro.IntToBool(PlayerPrefs.GetInt(AllOptionsKeyPro.ShadowEnable));
        _brightness         = PlayerPrefs.GetFloat(AllOptionsKeyPro.Brightness, DefaultBrightness);
        _realtimeReflection = AllOptionsKeyPro.IntToBool(PlayerPrefs.GetInt(AllOptionsKeyPro.RealtimeReflection, 1));
        _lodBias            = PlayerPrefs.GetFloat(AllOptionsKeyPro.LodBias, DefaultLoadBias);
        _hudScale           = PlayerPrefs.GetFloat(AllOptionsKeyPro.HUDScale, _hudScale);

        SetBrightness(_brightness);
        ShadowDistance(sd);
        ShadowDistanceSlider.value = sd;
        Volumen(_volumen);
        VolumenSlider.value = _volumen;
        ShadowProjectionType(shadowProjection);
        SetShadowEnable(_shadowEnable);
        SetRealTimeReflection(_realtimeReflection);
        SetLodBias(_lodBias);
        SetHUDScale(_hudScale);
        ApplyResolution();

        QualitySettings.shadowCascades = ShadowCascadeOptions[CurrentSC];
        ShadowCascadeText.text         = ShadowCascadeNames[CurrentSC].ToUpper();
        QualityText.text = QualitySettings.names[CurrentQuality].ToUpper();
        QualitySettings.SetQualityLevel(CurrentQuality);
        FullScreenOnText.text = (useFullScreen) ? "ON" : "OFF";
        ShowFPSText.text      = (_showFPS) ? "ON" : "OFF";
        if (FPSObject != null)
        {
            foreach (GameObject g in FPSObject)
            {
                g.SetActive(_showFPS);
            }
        }
        BrightnessSlider.value = _brightness;
        LoadBiasSlider.value   = _lodBias;
        HUDScaleFactor.value   = _hudScale;
        switch (CurrentAS)
        {
        case 0:
            QualitySettings.anisotropicFiltering = AnisotropicFiltering.Disable;
            AnisotropicText.text = AnisotropicFiltering.Disable.ToString().ToUpper();
            break;

        case 1:
            QualitySettings.anisotropicFiltering = AnisotropicFiltering.Enable;
            AnisotropicText.text = AnisotropicFiltering.Enable.ToString().ToUpper();
            break;

        case 2:
            QualitySettings.anisotropicFiltering = AnisotropicFiltering.ForceEnable;
            AnisotropicText.text = AnisotropicFiltering.ForceEnable.ToString().ToUpper();
            break;
        }

        switch (CurrentAA)
        {
        case 0:
            QualitySettings.antiAliasing = 0;
            break;

        case 1:
            QualitySettings.antiAliasing = 2;
            break;

        case 2:
            QualitySettings.antiAliasing = 4;
            break;

        case 3:
            QualitySettings.antiAliasing = 8;
            break;
        }
        AntiAliasingText.text = AntiAliasingNames[CurrentAA].ToUpper();

        switch (CurrentVSC)
        {
        case 0:
            QualitySettings.vSyncCount = 0;
            break;

        case 1:
            QualitySettings.vSyncCount = 1;
            break;

        case 2:
            QualitySettings.vSyncCount = 2;
            break;
        }
        vSyncText.text = VSyncNames[CurrentVSC].ToUpper();
        switch (CurrentBW)
        {
        case 0:
            QualitySettings.blendWeights = BlendWeights.OneBone;
            blendWeightsText.text        = BlendWeights.OneBone.ToString().ToUpper();
            break;

        case 1:
            QualitySettings.blendWeights = BlendWeights.TwoBones;
            blendWeightsText.text        = BlendWeights.TwoBones.ToString().ToUpper();
            break;

        case 2:
            QualitySettings.blendWeights = BlendWeights.FourBones;
            blendWeightsText.text        = BlendWeights.FourBones.ToString().ToUpper();
            break;
        }
        QualitySettings.masterTextureLimit = CurrentTL;
        TextureLimitText.text = TextureQualityNames[CurrentTL];

#if !UNITY_EDITOR
        ResolutionText.text = Screen.resolutions[CurrentRS].width + " X " + Screen.resolutions[CurrentRS].height;
        bool apply = (AutoApplyResolution) ? useFullScreen : false;
        Screen.SetResolution(Screen.resolutions[CurrentRS].width, Screen.resolutions[CurrentRS].height, apply);
#else
        ResolutionText.text = Screen.resolutions[0].width + " X " + Screen.resolutions[0].height;
#endif
    }
Exemplo n.º 4
0
    private void LoadAndApply()
    {
        int   num1   = PlayerPrefs.GetInt("GameName.AntiAliasing");
        int   num2   = PlayerPrefs.GetInt("GameName.AnisoTropic");
        int   num3   = PlayerPrefs.GetInt("GameName.BlendWeight");
        int   num4   = PlayerPrefs.GetInt("GameName.QualityLevel");
        int   index1 = PlayerPrefs.GetInt("GameName.ResolutionScreen");
        int   num5   = PlayerPrefs.GetInt("GameName.VSyncCount");
        int   num6   = PlayerPrefs.GetInt("GameName.TextureLimit", 0);
        int   index2 = PlayerPrefs.GetInt("GameName.ShadowCascade", 0);
        bool  flag1  = PlayerPrefs.GetInt("GameName.ShowFPS", 0) == 1;
        float num7   = PlayerPrefs.GetFloat("GameName.Volumen", 1f);
        float num8   = PlayerPrefs.GetFloat("GameName.ShadowDistance");
        bool  b      = PlayerPrefs.GetInt("GameName.ShadowProjection", 0) == 1;
        bool  flag2  = AllOptionsKeyPro.IntToBool(PlayerPrefs.GetInt("GameName.ShadowEnable"));
        float val    = PlayerPrefs.GetFloat("GameName.Brightness", 1f);
        bool  flag3  = AllOptionsKeyPro.IntToBool(PlayerPrefs.GetInt("GameName.RealtimeReflection", 1));
        float num9   = PlayerPrefs.GetFloat("GameName.LoadBias", 1f);
        float num10  = PlayerPrefs.GetFloat("GameName.HudScale", 0.0f);

        QualitySettings.set_shadowDistance(num8);
        AudioListener.set_volume(num7);
        AudioListener.set_pause(PlayerPrefs.GetInt("GameName.PauseAudio", 0) == 1);
        this.ShadowProjectionType(b);
        QualitySettings.set_masterTextureLimit(num6);
        QualitySettings.set_shadowCascades(this.ShadowCascadeOptions[index2]);
        QualitySettings.SetQualityLevel(num4);
        QualitySettings.set_realtimeReflectionProbes(flag3);
        QualitySettings.set_shadowDistance(!flag2 ? 0.0f : num8);
        QualitySettings.set_lodBias(num9);
        if (Object.op_Inequality((Object)this.BrightnessImage, (Object)null))
        {
            this.BrightnessImage.SetValue(val);
        }
        else
        {
            Debug.LogWarning((object)"You have not the brightness prefab in this scene, brightness will not work");
        }
        if (Object.op_Inequality((Object)this.HUDCanvas, (Object)null))
        {
            this.HUDCanvas.set_matchWidthOrHeight(1f - num10);
        }
        if (this.FPSObject != null)
        {
            foreach (GameObject gameObject in this.FPSObject)
            {
                gameObject.SetActive(flag1);
            }
        }
        switch (num2)
        {
        case 0:
            QualitySettings.set_anisotropicFiltering((AnisotropicFiltering)0);
            break;

        case 1:
            QualitySettings.set_anisotropicFiltering((AnisotropicFiltering)1);
            break;

        case 2:
            QualitySettings.set_anisotropicFiltering((AnisotropicFiltering)2);
            break;
        }
        switch (num1)
        {
        case 0:
            QualitySettings.set_antiAliasing(0);
            break;

        case 1:
            QualitySettings.set_antiAliasing(2);
            break;

        case 2:
            QualitySettings.set_antiAliasing(4);
            break;

        case 3:
            QualitySettings.set_antiAliasing(8);
            break;
        }
        switch (num5)
        {
        case 0:
            QualitySettings.set_vSyncCount(0);
            break;

        case 1:
            QualitySettings.set_vSyncCount(1);
            break;

        case 2:
            QualitySettings.set_vSyncCount(2);
            break;
        }
        switch (num3)
        {
        case 0:
            QualitySettings.set_blendWeights((BlendWeights)1);
            break;

        case 1:
            QualitySettings.set_blendWeights((BlendWeights)2);
            break;

        case 2:
            QualitySettings.set_blendWeights((BlendWeights)4);
            break;
        }
        Screen.SetResolution(((Resolution) ref Screen.get_resolutions()[index1]).get_width(), ((Resolution) ref Screen.get_resolutions()[index1]).get_height(), false);
    }
    private void LoadAndApply()
    {
        bl_Input.Instance.InitInput();
        this.CurrentAA      = PlayerPrefs.GetInt("GameName.AntiAliasing", this.DefaultAntiAliasing);
        this.CurrentAS      = PlayerPrefs.GetInt("GameName.AnisoTropic", this.DefaultAnisoTropic);
        this.CurrentBW      = PlayerPrefs.GetInt("GameName.BlendWeight", this.DefaultBlendWeight);
        this.CurrentQuality = PlayerPrefs.GetInt("GameName.QualityLevel", this.DefaultQuality);
        this.CurrentRS      = PlayerPrefs.GetInt("GameName.ResolutionScreen", this.DefaultResolution);
        this.CurrentVSC     = PlayerPrefs.GetInt("GameName.VSyncCount", this.DefaultVSync);
        this.CurrentTL      = PlayerPrefs.GetInt("GameName.TextureLimit", 0);
        this.CurrentSC      = PlayerPrefs.GetInt("GameName.ShadowCascade", 0);
        this._showFPS       = PlayerPrefs.GetInt("GameName.ShowFPS", 0) == 1;
        this._volumen       = PlayerPrefs.GetFloat("GameName.Volumen", 1f);
        float num = PlayerPrefs.GetFloat("GameName.ShadowDistance", (float)this.DefaultShadowDistance);

        this.shadowProjection = PlayerPrefs.GetInt("GameName.ShadowProjection", 0) == 1;
        this.PauseSound(PlayerPrefs.GetInt("GameName.PauseAudio", 0) == 1);
        this.useFullScreen       = PlayerPrefs.GetInt("GameName.ResolutionMode", 0) == 1;
        this._shadowEnable       = AllOptionsKeyPro.IntToBool(PlayerPrefs.GetInt("GameName.ShadowEnable"));
        this._brightness         = PlayerPrefs.GetFloat("GameName.Brightness", (float)this.DefaultBrightness);
        this._realtimeReflection = AllOptionsKeyPro.IntToBool(PlayerPrefs.GetInt("GameName.RealtimeReflection", 1));
        this._lodBias            = PlayerPrefs.GetFloat("GameName.LoadBias", (float)this.DefaultLoadBias);
        this._hudScale           = PlayerPrefs.GetFloat("GameName.HudScale", this._hudScale);
        this.SetBrightness(this._brightness);
        this.ShadowDistance(num);
        this.ShadowDistanceSlider.set_value(num);
        this.Volumen(this._volumen);
        this.VolumenSlider.set_value(this._volumen);
        this.ShadowProjectionType(this.shadowProjection);
        this.SetShadowEnable(this._shadowEnable);
        this.SetRealTimeReflection(this._realtimeReflection);
        this.SetLodBias(this._lodBias);
        this.SetHUDScale(this._hudScale);
        this.ApplyResolution();
        QualitySettings.set_shadowCascades(this.ShadowCascadeOptions[this.CurrentSC]);
        this.ShadowCascadeText.set_text(this.ShadowCascadeNames[this.CurrentSC].ToUpper());
        this.QualityText.set_text(QualitySettings.get_names()[this.CurrentQuality].ToUpper());
        QualitySettings.SetQualityLevel(this.CurrentQuality);
        this.FullScreenOnText.set_text(!this.useFullScreen ? "OFF" : "ON");
        this.ShowFPSText.set_text(!this._showFPS ? "OFF" : "ON");
        if (this.FPSObject != null)
        {
            foreach (GameObject gameObject in this.FPSObject)
            {
                gameObject.SetActive(this._showFPS);
            }
        }
        this.BrightnessSlider.set_value(this._brightness);
        this.LoadBiasSlider.set_value(this._lodBias);
        this.HUDScaleFactor.set_value(this._hudScale);
        switch (this.CurrentAS)
        {
        case 0:
            QualitySettings.set_anisotropicFiltering((AnisotropicFiltering)0);
            this.AnisotropicText.set_text(((AnisotropicFiltering)0).ToString().ToUpper());
            break;

        case 1:
            QualitySettings.set_anisotropicFiltering((AnisotropicFiltering)1);
            this.AnisotropicText.set_text(((AnisotropicFiltering)1).ToString().ToUpper());
            break;

        case 2:
            QualitySettings.set_anisotropicFiltering((AnisotropicFiltering)2);
            this.AnisotropicText.set_text(((AnisotropicFiltering)2).ToString().ToUpper());
            break;
        }
        switch (this.CurrentAA)
        {
        case 0:
            QualitySettings.set_antiAliasing(0);
            break;

        case 1:
            QualitySettings.set_antiAliasing(2);
            break;

        case 2:
            QualitySettings.set_antiAliasing(4);
            break;

        case 3:
            QualitySettings.set_antiAliasing(8);
            break;
        }
        this.AntiAliasingText.set_text(this.AntiAliasingNames[this.CurrentAA].ToUpper());
        switch (this.CurrentVSC)
        {
        case 0:
            QualitySettings.set_vSyncCount(0);
            break;

        case 1:
            QualitySettings.set_vSyncCount(1);
            break;

        case 2:
            QualitySettings.set_vSyncCount(2);
            break;
        }
        this.vSyncText.set_text(this.VSyncNames[this.CurrentVSC].ToUpper());
        switch (this.CurrentBW)
        {
        case 0:
            QualitySettings.set_blendWeights((BlendWeights)1);
            this.blendWeightsText.set_text(((BlendWeights)1).ToString().ToUpper());
            break;

        case 1:
            QualitySettings.set_blendWeights((BlendWeights)2);
            this.blendWeightsText.set_text(((BlendWeights)2).ToString().ToUpper());
            break;

        case 2:
            QualitySettings.set_blendWeights((BlendWeights)4);
            this.blendWeightsText.set_text(((BlendWeights)4).ToString().ToUpper());
            break;
        }
        QualitySettings.set_masterTextureLimit(this.CurrentTL);
        this.TextureLimitText.set_text(this.TextureQualityNames[this.CurrentTL]);
        this.ResolutionText.set_text(((Resolution) ref Screen.get_resolutions()[this.CurrentRS]).get_width().ToString() + " X " + (object)((Resolution) ref Screen.get_resolutions()[this.CurrentRS]).get_height());
        Screen.SetResolution(((Resolution) ref Screen.get_resolutions()[this.CurrentRS]).get_width(), ((Resolution) ref Screen.get_resolutions()[this.CurrentRS]).get_height(), this.AutoApplyResolution && this.useFullScreen);
    }
    /// <summary>
    ///
    /// </summary>
    void LoadAndApply()
    {
        int CurrentAA      = PlayerPrefs.GetInt(AllOptionsKeyPro.AntiAliasing);
        int CurrentAS      = PlayerPrefs.GetInt(AllOptionsKeyPro.AnisoTropic);
        int CurrentBW      = PlayerPrefs.GetInt(AllOptionsKeyPro.BlendWeight);
        int CurrentQuality = PlayerPrefs.GetInt(AllOptionsKeyPro.Quality);

        #if !UNITY_EDITOR
        int CurrentRS = PlayerPrefs.GetInt(AllOptionsKeyPro.Resolution);
       #endif
        int   CurrentVSC          = PlayerPrefs.GetInt(AllOptionsKeyPro.VsyncCount);
        int   CurrentTL           = PlayerPrefs.GetInt(AllOptionsKeyPro.TextureLimit, 0);
        int   CurrentSC           = PlayerPrefs.GetInt(AllOptionsKeyPro.ShadowCascade, 0);
        bool  _showFPS            = (PlayerPrefs.GetInt(AllOptionsKeyPro.ShowFPS, 0) == 1) ? true : false;
        float _volumen            = PlayerPrefs.GetFloat(AllOptionsKeyPro.Volumen, 1);
        float sd                  = PlayerPrefs.GetFloat(AllOptionsKeyPro.ShadowDistance);
        bool  shadowProjection    = (PlayerPrefs.GetInt(AllOptionsKeyPro.ShadownProjection, 0) == 1) ? true : false;
        bool  _shadowEnable       = AllOptionsKeyPro.IntToBool(PlayerPrefs.GetInt(AllOptionsKeyPro.ShadowEnable));
        float _brightness         = PlayerPrefs.GetFloat(AllOptionsKeyPro.Brightness, 1);
        bool  _realtimeReflection = AllOptionsKeyPro.IntToBool(PlayerPrefs.GetInt(AllOptionsKeyPro.RealtimeReflection, 1));
        float _lodBias            = PlayerPrefs.GetFloat(AllOptionsKeyPro.LodBias, 1);
        float _hudScale           = PlayerPrefs.GetFloat(AllOptionsKeyPro.HUDScale, 0);

        QualitySettings.shadowDistance = sd;
        AudioListener.volume           = _volumen;
        AudioListener.pause            = (PlayerPrefs.GetInt(AllOptionsKeyPro.PauseAudio, 0) == 1 ? true : false);
        ShadowProjectionType(shadowProjection);
        QualitySettings.masterTextureLimit = CurrentTL;
        QualitySettings.shadowCascades     = ShadowCascadeOptions[CurrentSC];
        QualitySettings.SetQualityLevel(CurrentQuality);
        QualitySettings.realtimeReflectionProbes = _realtimeReflection;
        QualitySettings.shadowDistance           = (_shadowEnable) ? sd : 0;
        QualitySettings.lodBias = _lodBias;
        if (BrightnessImage != null)
        {
            BrightnessImage.SetValue(_brightness);
        }
        else
        {
            Debug.LogWarning("You have not the brightness prefab in this scene, brightness will not work");
        }
        if (HUDCanvas != null)
        {
            HUDCanvas.matchWidthOrHeight = (1 - _hudScale);
        }
        if (FPSObject != null)
        {
            foreach (GameObject g in FPSObject)
            {
                g.SetActive(_showFPS);
            }
        }

        switch (CurrentAS)
        {
        case 0:
            QualitySettings.anisotropicFiltering = AnisotropicFiltering.Disable;
            break;

        case 1:
            QualitySettings.anisotropicFiltering = AnisotropicFiltering.Enable;
            break;

        case 2:
            QualitySettings.anisotropicFiltering = AnisotropicFiltering.ForceEnable;
            break;
        }

        switch (CurrentAA)
        {
        case 0:
            QualitySettings.antiAliasing = 0;
            break;

        case 1:
            QualitySettings.antiAliasing = 2;
            break;

        case 2:
            QualitySettings.antiAliasing = 4;
            break;

        case 3:
            QualitySettings.antiAliasing = 8;
            break;
        }

        switch (CurrentVSC)
        {
        case 0:
            QualitySettings.vSyncCount = 0;
            break;

        case 1:
            QualitySettings.vSyncCount = 1;
            break;

        case 2:
            QualitySettings.vSyncCount = 2;
            break;
        }
        switch (CurrentBW)
        {
        case 0:
            QualitySettings.blendWeights = BlendWeights.OneBone;
            break;

        case 1:
            QualitySettings.blendWeights = BlendWeights.TwoBones;
            break;

        case 2:
            QualitySettings.blendWeights = BlendWeights.FourBones;
            break;
        }

#if !UNITY_EDITOR
        Screen.SetResolution(Screen.resolutions[CurrentRS].width, Screen.resolutions[CurrentRS].height, false);
#endif
    }