Skip to content

Commit 7c18bea

Browse files
committed
defaulting to the first action map after assigning asset
1 parent 64f44c1 commit 7c18bea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ void AddEntry(InputAction action, PlayerInput.ActionEvent actionEvent)
551551
var selectedDefaultActionMap = !string.IsNullOrEmpty(playerInput.defaultActionMap)
552552
? asset.FindActionMap(playerInput.defaultActionMap)
553553
: null;
554-
m_SelectedDefaultActionMap = 0;
554+
m_SelectedDefaultActionMap = (asset.actionMaps.Count > 0 && m_SelectedDefaultActionMap == -1) ? 1 : 0;
555555
var actionMaps = asset.actionMaps;
556556
m_ActionMapOptions = new GUIContent[actionMaps.Count + 1];
557557
m_ActionMapOptions[0] = new GUIContent(EditorGUIUtility.TrTextContent("<None>"));

0 commit comments

Comments
 (0)