- Home /
How to change the quality of the game while playing it?
I've created a dropdown and a list of quality options for example: 'Very high, high, medium, low' in the dropdown, however the quality doesn't change. I don't this code is right but if it's not, then send me the right one please.
The code:
public void Quality_V_high ()
{
QualitySettings.SetQualityLevel (6, true);
}
public void Quality_high ()
{
QualitySettings.SetQualityLevel (5, true);
}
public void Quality_medium ()
{
QualitySettings.SetQualityLevel (4, true);
}
public void Quality_Low ()
{
QualitySettings.SetQualityLevel (3, true);
}
}
Here is a picture of the dropdown
And here is what it looks like in the inspector:
It will really help me if someone answers this because i need to move on in the game. Please also note that the code is written in c#.
How many quality settings have you defined for the target platform? Rather than harrowing int values, you'd be better to query QualitySettings.names
Can you show me an example
I've defined 4
See the example on the SetQualityLevel docs page.
Answer by Zitoox · Oct 26, 2016 at 05:22 PM
I once asked something that was similar to it. Here's a link that might help you:
https://docs.unity3d.com/ScriptReference/QualitySettings.SetQualityLevel.html
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Firing projectiles on the XZ Plane 2 Answers
Need help in typing project 0 Answers
how to make the sprite and the background color in a tile disappear? 0 Answers
LineRenderer static movement 1 Answer