I want to achieve

I want to implement in-game settings that allow me to change the quality at the push of a button, not from the resolution dialog.

I'm building for Windows so I want to be able to change it with the mouse.

I'm having trouble searching because I can only find a way to change the quality from the display resolution dialog.
I'm still a beginner, so it would be very helpful if you could explain it in an easy-to-understand manner.

The version of Unity i am using

2020.1.7 f1

  • Answer # 1

    Screen.SetResolution (int width, int height, true)

    You can change the resolution (screen size) with.

    width is the horizontal size and height is the vertical size.

    The third argument specifies whether it is full screen.
    Here istrueOtherwise, the window size will change.


    When the button is pressed (in the Button component or Event Trigger), the process is called from the Controller (lower script).

    public class Controller: MonoBehaviour
        // Click the 1080p button
        public void Clicked1080 ()
            Screen.SetResolution (1920, 1080, true)
        // ... Set 720p and 360p in the same way