S
S
Sergey Klykov2015-07-03 12:38:52
Unity
Sergey Klykov, 2015-07-03 12:38:52

How to put graphics settings in the menu in Unity3d?

I took the standard menu from https://www.assetstore.unity3d.com/en/#!/content/25468.
What to put in the UI Button so that you can adjust the graphics settings?
df18fff3fe0e4c049b0c204ce44bc183.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Popchikovsky, 2015-07-03
@DEMIGODDD

Example from the documentation for QualitySettings.SetQualityLevel()

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void OnGUI() {
        string[] names = QualitySettings.names;
        GUILayout.BeginVertical();
        int i = 0;
        while (i < names.Length) {
            if (GUILayout.Button(names[i]))
                QualitySettings.SetQualityLevel(i, true);
            
            i++;
        }
        GUILayout.EndVertical();
    }
}

Adapt for yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question