Skip to content

Commit 319f404

Browse files
authored
FIX: Return a valid input action from GetSelectedAction when a binding is selected (ISX-1832). (#1824)
1 parent d1db8c6 commit 319f404

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ however, it has to be formatted properly to pass verification tests.
3434
- Fixed issue where composite part dropdown manipulates binding path and leaves composite part field unchanged.
3535
- Fixed lingering highlight effect on Save Asset button after clicking.
3636
- Fixed missing name in window title for Input Action assets.
37+
- Fixed "Listen" functionality for selecting an input sometimes expecting the wrong input type.
3738

3839
## [1.8.0-pre.2] - 2023-11-09
3940

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/Selectors.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,11 @@ public static IEnumerable<string> GetCompositePartOptions(string bindingName, st
213213
?.wrappedProperty.FindPropertyRelative(nameof(InputActionMap.m_Actions));
214214
if (actions == null || actions.arraySize - 1 < state.selectedActionIndex || state.selectedActionIndex < 0)
215215
return null;
216+
217+
// If we've currently selected a binding, get the parent input action for it.
218+
if (state.selectionType == SelectionType.Binding)
219+
return GetRelatedInputAction(state);
220+
216221
return new SerializedInputAction(actions.GetArrayElementAtIndex(state.selectedActionIndex));
217222
}
218223

0 commit comments

Comments
 (0)