Real Time Quality Settings

Hi to everyone
Could anybody tell and give me an example about how can i change quality setting by script.

Options should be like,
Shadow On/Off
Shadow Quality Low / Medium / High
Shadow Distance
Anti aliasing 2X / 4X / 6X
vs…

I found something about these topics in Unity’s documentation. But I couldn’t use. Can anybody write me sample scripts as i want please?

Did you look at this?

I don’t think that the settings you want are directly accessible via scripts, but you can just etup your desired settings in the editor and switch between them using QualityLevelcurrentLevel

QualitySettings.currentLevel = QualityLevel.Good;