Skip to content

Commit 538a7fa

Browse files
committed
Only enable PWA actions if they are all disabled
1 parent 91f25f3 commit 538a7fa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3652,7 +3652,12 @@ internal static void OnPlayModeChange(PlayModeStateChange change)
36523652
s_SystemObject.enterPlayModeTime = InputRuntime.s_Instance.currentTime;
36533653
s_Manager.SyncAllDevicesAfterEnteringPlayMode();
36543654
#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
3655-
EnableActions();
3655+
// Don't enable actions if some are already enabled.
3656+
// This is useful when you just want specific action maps to be enabled, but not all
3657+
// action maps.
3658+
if (!InputSystem.actions.enabled)
3659+
EnableActions();
3660+
36563661
#endif // UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
36573662
break;
36583663

0 commit comments

Comments
 (0)