Skip to content

Commit 0c77ea4

Browse files
committed
Fixed enabling all action maps for project wide actions overrides playerinput
1 parent b9153bc commit 0c77ea4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Packages/com.unity.inputsystem/InputSystem/InputSystem.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3035,7 +3035,8 @@ private static void EnableActions()
30353035
if (actions == null)
30363036
return;
30373037

3038-
actions.Enable();
3038+
if (!actions.enabled)
3039+
actions.Enable();
30393040
}
30403041

30413042
private static void DisableActions(bool triggerSetupChanged = false)

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,10 @@ public void ActivateInput()
954954

955955
m_InputActive = true;
956956

957+
// reset state to default, only one action map is enabled at the initial state
958+
// Project wide actions may have enabled action maps
959+
actions.Disable();
960+
957961
// If we have no current action map but there's a default
958962
// action map, make it current.
959963
if (m_CurrentActionMap == null && m_Actions != null && !string.IsNullOrEmpty(m_DefaultActionMap))

0 commit comments

Comments
 (0)