- Home /
Question by
raphu604 · Jul 25, 2013 at 10:41 PM ·
runtimefilterquality settings
Why can't I change the anisotropic filter at runtime?
I tried searching for this everywhere, but I didn't find anything helpful sadly. I am programming my settings menu (in the main menu) of my game project, and I created a slider for anti-aliasing (which works perfectly) and one for anisotropic filtering. The AA slider works, the AF doesn't, even though the two are almost identical. What am I doing wrong? Even the scripting docs tell me that I should write it this way...
Here is my piece of code:
switch((int)g_AASlider){
case 0:
QualitySettings.antiAliasing = 0;
AA_dispString = AAStrings[0];
break;
case 1:
QualitySettings.antiAliasing = 2;
AA_dispString = AAStrings[1];
break;
case 2:
QualitySettings.antiAliasing = 4;
AA_dispString = AAStrings[2];
break;
case 3:
QualitySettings.antiAliasing = 8;
AA_dispString = AAStrings[3];
break;
}
switch((int)g_AFSlider){ //FIX ME PLS
case 0:
QualitySettings.anisotropicFiltering = AnisotropicFiltering.Disable;
AF_dispString = AFStrings[0];
break;
case 1:
QualitySettings.anisotropicFiltering = AnisotropicFiltering.Enable;
AF_dispString = AFStrings[1];
break;
case 2:
QualitySettings.anisotropicFiltering = AnisotropicFiltering.ForceEnable;
AF_dispString = AFStrings[2];
break;
}
(the switch cases refer to the typecasted int returned by the slider, and the string array displays on the screen which option is currently selected)
I really hope somebody can help me :)
Comment