- Home /
Question by
Noztradamuz · Jan 05, 2015 at 11:19 PM ·
graphicssettingsqualityanti aliasing
Set AA Quality besides the other settings.
Hi, i want to know if it possible to manually set the Anti Aliasing quality level besides the selected quality level, for example: If I select Good Quality Level in my settings but I want to set AA to Enabled is that possible, obviously im talking about in-game settings, not editor, i know its possible in the editor if i set the preset to have AA enabled, but i want to be able to do it in code separately, how I need to do it if its possible. This is so far my code, i want to know if its good, before i develop any GUI for that.
public static int[] LoadVideoSettings()
{
int[] settings = new int[2];
if(PlayerPrefs.HasKey("UnityGraphicsQuality"))
currentVideoSetting = (PlayerPrefs.GetInt("UnityGraphicsQuality") >= 0 && PlayerPrefs.GetInt("UnityGraphicsQuality") < 6)?PlayerPrefs.GetInt("UnityGraphicsQuality"):0;
else
{
PlayerPrefs.SetInt("UnityGraphicsQuality",0);
currentVideoSetting = 0;
}
settings [0] = currentVideoSetting;
if(PlayerPrefs.HasKey("AALevel"))
currentAASetting = (PlayerPrefs.GetInt("AALevel") >= 0 && PlayerPrefs.GetInt("AALevel") < 9)?PlayerPrefs.GetInt("AALevel"):0;
else
{
PlayerPrefs.SetInt("AALevel",0);
currentAASetting = 0;
}
settings [1] = currentAASetting;
return settings;
}
public static void ApplyVideoSettings()
{
QualitySettings.SetQualityLevel (currentVideoSetting, true);
QualitySettings.antiAliasing = currentAASetting;
}
Comment