Skip to content

Commit de8c453

Browse files
authored
FIX: Default control scheme should be "All" (ISX-1929) (#1883)
1 parent b916865 commit de8c453

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorState.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ public InputActionsEditorState(InputActionsEditorState other, SerializedObject a
123123
// if the asset would be modified during domain reload.
124124
serializedObject = asset;
125125

126+
if (other.Equals(default(InputActionsEditorState)))
127+
{
128+
// This instance was created by default constructor and thus is missing some appropriate defaults:
129+
other.m_selectionType = SelectionType.Action;
130+
other.m_selectedControlSchemeIndex = -1;
131+
other.m_selectedDeviceRequirementIndex = -1;
132+
}
133+
126134
// Attempt to preserve action map selection by GUID, otherwise select first or last resort none
127135
var otherSelectedActionMap = other.GetSelectedActionMap();
128136
var actionMapCount = Selectors.GetActionMapCount(asset);

0 commit comments

Comments
 (0)