Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: ISXB-621 disable all action maps except default map when input system is started #1936

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ however, it has to be formatted properly to pass verification tests.
- Fixed an issue where a composite binding would not be consecutively triggered after ResetDevice() has been called from the associated action handler [ISXB-746](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-746).
- Fixed resource designation for "d_InputControl" icon to address CI failure.
- Fixed an issue where a composite binding would not be consecutively triggered after disabling actions while there are action modifiers in progress [ISXB-505](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-505).
- Fixed issue where all action maps default to enabled when InputSystem is enabled [ISXB-621](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-621). Now, only the default map is enabled.

## [1.8.2] - 2024-04-29

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,21 @@ public void SwitchCurrentActionMap(string mapNameOrId)
return;
}

if (currentActionMap == null)
{
//Disabling all action maps, because we don't know which one is currently enabled
foreach (var i in m_Actions.actionMaps)
{
i.Disable();
}
}
else
{
//Disabling the currently enabled action map
currentActionMap.Disable();
}
currentActionMap = actionMap;
currentActionMap.Enable();
}

/// <summary>
Expand Down Expand Up @@ -1621,6 +1635,11 @@ void Reset()

#endif

private void Start()
{
ActivateInput();
}

private void OnEnable()
{
m_Enabled = true;
Expand All @@ -1630,7 +1649,6 @@ private void OnEnable()
AssignPlayerIndex();
InitializeActions();
AssignUserAndDevices();
ActivateInput();
}

// Split-screen index defaults to player index.
Expand Down