Skip to content

Commit b0478f0

Browse files
authored
[Input System] Fixed pasting bindings into empty Input Action asset (case ISXB-1180) (#2046)
FIX: Fixed pasting bindings into empty Input Action asset (case ISXB-1180)
1 parent 9ab25ab commit b0478f0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ however, it has to be formatted properly to pass verification tests.
2121
- Fixed an issue with The "Add Control Scheme..." popup window so that it now persists until any changes are explicitly Saved or Cancelled [case ISXB-1131](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1131).
2222
- Fixed missing documentation for source generated Input Action Assets. This is now generated as part of the source code generation step when "Generate C# Class" is checked in the importer inspector settings.
2323
- Fixed pasting into an empty map list raising an exception. [ISXB-1150](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1150)
24+
- Fixed pasting bindings into empty Input Action asset. [ISXB-1180](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1180)
2425

2526
### Changed
2627
- Added back the InputManager to InputSystem project-wide asset migration code with performance improvement (ISX-2086).

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private static void PasteBindingsFromClipboard(InputActionsEditorState state)
221221
{
222222
var actionMap = Selectors.GetSelectedActionMap(state)?.wrappedProperty;
223223
var bindingsArray = actionMap?.FindPropertyRelative(nameof(InputActionMap.m_Bindings));
224-
224+
if (bindingsArray == null) return;
225225
int newBindingIndex;
226226
if (state.selectionType == SelectionType.Action)
227227
newBindingIndex = Selectors.GetLastBindingIndexForSelectedAction(state);

0 commit comments

Comments
 (0)