- Home /
"MissingMethodException: QualitySettings.GetQualityLevel"
I'm trying to get the quality level, but it's giving me a "MissingMethodException" error.
I even tried exactly what the docs demonstrate here, but no matter what I do, or where I put the code, I still get this error:
I've tried Googling the issue, but nothing comes up.
I've tried exactly what it shows in the docs:
var qualityLevel = QualitySettings.GetQualityLevel ();
And also declaring the int variable first then applying to it later the same way, but no luck.
I'm using version 5.4.0f2. Is this a bug, or am I missing something? I'm really confused here.
Answer by Eric5h5 · Nov 12, 2016 at 07:45 PM
You called your script QualitySettings and don't have a function called GetQualityLevel, so unless you disambiguate the call, Unity doesn't know that you meant UnityEngine.QualitySettings rather than your own. By the way, put #pragma strict at the top of all your scripts, so you catch errors like this at compile-time rather than when running the code.
Oops. Wow. I feel like an idiot now. I usually know better than to make that mistake, but apparently not this time. Heh, thanks!
Your answer
![](https://koobas.hobune.stream/wayback/20220612100519im_/https://answers.unity.com/themes/thub/images/avi.jpg)