How to disable an object if the Quality setting is set to low in Unity C#
2 replies, posted
I want to disable ( ͡° ͜ʖ ͡°), an object when the game quality is set to low or medium
Looking here: https://docs.unity3d.com/ScriptReference/QualitySettings.html
It seems like there is QualitySettings.GetQualityLevel() which returns an integer of what the current Quality Level is set to. I guess this depends on what Quality settings you have added. I did a quick test, default Quality settings are:
0 = Very Low
1 = Low
2 = Medium
3 = High
4 = Very High
5 = Ultra
So something like this should do it
if(QualitySettings.GetQualityLevel() <= 2) {
gameObject.SetActive(false);
}
ok i will try
Sorry, you need to Log In to post a reply to this thread.