Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Quality settings pause menu help

Discussion in 'UGUI & TextMesh Pro' started by IDontCare85060, Jun 29, 2015.

  1. IDontCare85060

    IDontCare85060

    Joined:
    Jan 23, 2015
    Posts:
    28
    Hi, i need help with my setting menu i'm trying to figure out how to make it so that in the game the player can change the quality (to fastest, fast, good, simple so on) using the UI. I was trying to make it
    Like this :
    Preview 1.png or preview 2.png


    Thanks in advance.
     
  2. bartm4n

    bartm4n

    Joined:
    Jun 20, 2013
    Posts:
    57
    Are you asking for help getting your script to work, or are you asking for someone to write a script for you?
     
  3. IDontCare85060

    IDontCare85060

    Joined:
    Jan 23, 2015
    Posts:
    28
    Help getting it to work ha forgot to put it in
     
  4. IDontCare85060

    IDontCare85060

    Joined:
    Jan 23, 2015
    Posts:
    28
    Code (JavaScript):
    1. #pragma strict
    2.  
    3. function OnGUI () {
    4. GUI.Box (Rect (10,10,200,1000), "Graphics Resolution");
    5. if (GUI.Button (Rect (20,40,80,20), "Fastest")) {
    6.      QualitySettings.currentLevel = QualityLevel.Fastest;
    7.      }
    8.      // Make the second button.
    9.      if (GUI.Button (Rect (20,70,80,20), "Fast")) {
    10.          QualitySettings.currentLevel = QualityLevel.Fast;
    11.      }
    12.      // Make the second button.
    13.      if (GUI.Button (Rect (20,100,80,20), "Simple")) {
    14.          QualitySettings.currentLevel = QualityLevel.Simple;
    15.      }
    16.      // Make the second button.
    17.      if (GUI.Button (Rect (20,130,80,20), "Good")) {
    18.          QualitySettings.currentLevel = QualityLevel.Good;
    19.      }
    20.      // Make the second button.
    21.      if (GUI.Button (Rect (20,160,80,20), "Beautiful")) {
    22.          QualitySettings.currentLevel = QualityLevel.Beautiful;
    23.      }
    24.      // Make the second button.
    25.      if (GUI.Button (Rect (20,190,80,20), "Fantastic")) {
    26.          QualitySettings.currentLevel = QualityLevel.Fantastic;
    27.    }
    28. }
    29.  
    This is the code i'm using but i want to use the UI system.