UnityEngine.QualitySettings.SetQualityLevel C# (CSharp) Method

SetQualityLevel() private method

private SetQualityLevel ( int index ) : void
index int
return void
        public static void SetQualityLevel(int index)
        {
            bool applyExpensiveChanges = true;
            SetQualityLevel(index, applyExpensiveChanges);
        }

Same methods

QualitySettings::SetQualityLevel ( int index, [ applyExpensiveChanges ) : void

Usage Example

コード例 #1
0
        void OnOptionsGUI()
        {
            GUILayout.Label("\nQUALITY\n");


            Quality.antiAliasing = UI.OptionsWindow.MultipleOptions(Quality.antiAliasing,
                                                                    "Anti aliasing", 0, 1, 2, 4);

            string newLevel = UI.OptionsWindow.MultipleOptions(this.qualitySettingsNames[Quality.GetQualityLevel()],
                                                               "Quality level", this.qualitySettingsNames);
            int newLevelIndex = System.Array.FindIndex(this.qualitySettingsNames, n => n == newLevel);

            if (Quality.GetQualityLevel() != newLevelIndex)
            {
                Quality.SetQualityLevel(newLevelIndex);
            }

            Quality.shadowDistance = UI.OptionsWindow.FloatSlider(Quality.shadowDistance,
                                                                  0, 500, "Shadow distance");
        }
All Usage Examples Of UnityEngine.QualitySettings::SetQualityLevel