void DrawKeysActionInput(bool _show, TCT_ActionInput _action) { if (!_show) { return; } if (_action == null || _action.AllKeyCodes.Count < 1) { return; } for (int i = 0; i < _action.AllKeyCodes.Count; i++) { Enum _currentKeyCode = _action.AllKeyCodes[i]; EditorGUILayout.BeginHorizontal(); EditorGUILayout.Separator(); EditorLayout.EnumPopup(ref _currentKeyCode, ""); if (_action.ExistKeyCode((KeyCode)_currentKeyCode) && (KeyCode)_currentKeyCode != _action.AllKeyCodes[i]) { Debug.LogWarning("this Key is already assign in this Action. Please select an other"); } else { _action.AllKeyCodes[i] = (KeyCode)_currentKeyCode; } EditorLayout.Button("x", RemoveKeyCode, _action, (KeyCode)_currentKeyCode); EditorGUILayout.EndHorizontal(); EditorLayout.Space(); } }