"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 82004-getqualitylevel-error.jpg

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.

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.