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 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);

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.

The pause menu script on the wiki gives a good example on how to use the QualitySettings.

Thank you for the replies.

Thats awesome, thank you all very much :D