3 using System.Collections.Generic;
7 namespace HKI.Core.UI.Settings
12 [RequireComponent(typeof(TMP_Dropdown))]
17 [SerializeField] List<TextLocalization> QualityTextLocalizations =
new List<TextLocalization>();
18 [SerializeField]
String Quality = null;
21 TMP_Dropdown dropdown = null;
26 dropdown = GetComponent<TMP_Dropdown>();
34 List<TMP_Dropdown.OptionData> list =
new List<TMP_Dropdown.OptionData>();
35 for (
int i = 0; i < QualityTextLocalizations.Count; i++)
36 list.Add(
new TMP_Dropdown.OptionData(QualityTextLocalizations[i].GetText(Language)));
38 dropdown.ClearOptions();
39 dropdown.AddOptions(list);
41 dropdown.value = QualitySettings.GetQualityLevel();
44 Debug.LogError(
"(UIQualityDropdown) Quality value is null!");
51 Quality.
SetValue = QualitySettings.names[dropdown.value];
56 List<TMP_Dropdown.OptionData> list =
new List<TMP_Dropdown.OptionData>();
57 for (
int i = 0; i < QualityTextLocalizations.Count; i++)
58 list.Add(
new TMP_Dropdown.OptionData(QualityTextLocalizations[i].GetText(Language)));
60 dropdown.ClearOptions();
61 dropdown.AddOptions(list);
63 dropdown.value = QualitySettings.GetQualityLevel();
This MonoBehaviour fills and handles a dropdown (TMP_Dropdown) with quality settings.
Special Variable enables the use of the SystemLanguage data type as a variable of the settings system...
void SetQualityToDropdownValue()
Implementation of a string value as a HKIVar via HKIVarGeneric.