public void InitList(HotKeys hotkeys) { ToggleOn(); KeyBindingHelper helper = new KeyBindingHelper(); textlabels = new List <TMP_Text>(); buttonlabels = new List <TextButton>(); KeyBindingNames[] names = hotkeys.GetKeys(); foreach (KeyBindingNames n in names) { InitLabel(helper.GetBindingNames(n)); InitButton(n, helper.GetKEyName(hotkeys.hotkeys[n])); } }