Quality changing not working
This code SHOULD change the quality of the game but I cant see why it doesnt, The script below is on my options menu Object, on the dropdown UI element I have it set to change the dynamic int setQuality, my default quality is set at High, so is the default on the dropdown, it SHOULD change the quality index according to whichever I select but it just doesn't and I can't figure out why!
// SETS THE QUALITY ACCORDING TO WHAT IS SELECTED
public void SetQuality (int qualityIndex)
{
QualitySettings.SetQualityLevel(qualityIndex);
}
Answer by lgarczyn · Dec 13, 2019 at 11:38 PM
I'm not sure it should actually. The project setting windows could represent the build and play defaults instead of their current value. Check by changing the anti aliasing settings, to see if there's a visual difference, or by using GetQualityLevel
Hi
Checked the output using:
public void Update()
{
Debug.Log(QualitySettings.GetQualityLevel());
}
And realized that im actually using a Very Low setting also, so added that to the dropdown list, seems the quality levels are changing as I select, it just isnt registering in the build settings, which is curious because in the tutorial I watched it did, maybe Unity got rid of the feature. Nevertheless, it seems it does indeed change. Thanks for the advice!
Your answer
![](https://koobas.hobune.stream/wayback/20220612220128im_/https://answers.unity.com/themes/thub/images/avi.jpg)