- Home /
In-game quality control
Hi all,
I do apologise if this has been asked already. I've tried the search option but cant seem to find the answer I'm looking for. (I'm probably searching the wrong text)
Is it possible to be able to change the unity player settings when in-game?
Im working on a project that i know will be run on some higher end systems, but also very probably on some very low systems and im wanting to know if i can have an in game option for changing the quality settings of the scene. i.e turning off lighting, changing it from beautiful to fastest etc so it runs smoothly. This will be web based.
Any help would be great.
I'm also fairly new to scripting in unity.
Thanks again
the search functionality of the documentation is not as well as it should be. so you can not find things with that. use google search and tell it to search in unity's online documentation. juset use the query:url syntax.
Thank you for the replies.
Thats awesome, thank you all very much :D
Answer by burnumd · Mar 04, 2010 at 03:51 PM
The QualitySettings class provides access to both the predefined quality levels (via the "currentLevel" field) and finer-grained control over specific aspects of the current quality level. Quality level settings are defined in Edit->Project Settings->Quality. If you're interested in automatic quality changes based on framerate, the "PerformanceTweak" script in the Island Demo project is a great starting point. Otherwise a simple selection grid in whatever menu you want will accomplish what you want, eg:
QualitySettings.currentLevel = (QualityLevel)GUILayout.SelectionGrid ((int)QualitySettings.currentLevel, prettyQualityLevelStrings, xCount);
Answer by duck · Mar 04, 2010 at 03:36 PM
Yes, you can do this in your own scripts via the QualitySettings class.
It allows you to adjust the individual elements such as pixel light count and shadow cascades, and also to just step up and down through your pre-defined quality levels using the IncreaseLevel and DecreaseLevel functions.
Answer by JDonavan 1 · Mar 04, 2010 at 11:21 PM
The pause menu script on the wiki gives a good example on how to use the QualitySettings.
Your answer
Follow this Question
Related Questions
Accessing quality settings in-game 1 Answer
Adjustable Fog In Settings Scene 0 Answers
Change the keycode in game by associating it to the previous script 0 Answers
Some quality settings not saving when altered in-game 0 Answers
LWRP setting anti-aliasing of already created render texture is not supported 4 Answers