- Home /
Annoying warning with GUI, quick fix?
Hello. I made my menu starting with a script I found here. And this isn't a problem at all, but it's seriously annoying, I keep getting these yellow compiler warnings because apparently a line in the script I started off with is obsolete.
Assets/Game Project/Scripts/menu.js(98,49): BCW0012: WARNING: 'UnityEngine.QualitySettings.currentLevel' is obsolete. Use GetQualityLevel and SetQualityLevel
How can I quickly fix this?
Here is one of the lines in my script it is complaining about:
QualitySettings.currentLevel = QualityLevel.Fast;
I tried changing QualityLevel to SetQualityLevel, but it said 'Unknown Identifier'
Answer by Piflik · May 07, 2012 at 11:44 AM
Well...do as it says...use GetQualityLevel/SetQualityLevel (depending on whether you want to read or write) instead of QualitySettings.currentLevel...
QualitySettings.SetQualityLevel(k);
(k is a number between 0 and 5...or more, if you added additional quality levels)
I tried that. It says that GetQualityLevel and SetQualityLevel are unknown identifiers.
Thanks. It worked :)
Although the guys right. I could have just looked in the manual.
Your answer
Follow this Question
Related Questions
HighScore analytics 0 Answers
Expecting variable error with a button 1 Answer
GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced) 0 Answers
GUI not work after building 1 Answer
How to initialize a boolean only once when used in a function when called OnGUI 1 Answer