public bool AddBinding(string control, KeyCode key) { if (!playerInput.AddControlBinding(control, key)) { // Did not succeed at setting a binding. return(false); } else { // Successfully set a binding. Update the display. bindingLists[control].text = playerInput.GetControlBinding(control).AllKeysToString(); return(true); } }