diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInput.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInput.cs
index 0dbfc82e16..a493c50889 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInput.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInput.cs
@@ -904,10 +904,8 @@ public void PassivateInput()
///
///
///
- public bool SwitchCurrentControlScheme(params InputDevice[] devices)
+ public bool SwitchCurrentControlScheme(InputDevice[] devices)
{
- if (devices == null)
- throw new ArgumentNullException(nameof(devices));
if (actions == null)
throw new InvalidOperationException(
"Must set actions on PlayerInput in order to be able to switch control schemes");
@@ -949,12 +947,10 @@ public bool SwitchCurrentControlScheme(params InputDevice[] devices)
///
///
///
- public void SwitchCurrentControlScheme(string controlScheme, params InputDevice[] devices)
+ public void SwitchCurrentControlScheme(string controlScheme, InputDevice[] devices)
{
if (string.IsNullOrEmpty(controlScheme))
throw new ArgumentNullException(nameof(controlScheme));
- if (devices == null)
- throw new ArgumentNullException(nameof(devices));
user.FindControlScheme(controlScheme, out InputControlScheme scheme); // throws if not found
SwitchControlSchemeInternal(ref scheme, devices);
@@ -1939,10 +1935,8 @@ private void OnDeviceChange(InputDevice device, InputDeviceChange change)
}
}
- private void SwitchControlSchemeInternal(ref InputControlScheme controlScheme, params InputDevice[] devices)
+ private void SwitchControlSchemeInternal(ref InputControlScheme controlScheme, InputDevice[] devices)
{
- Debug.Assert(devices != null);
-
// Note that we are doing two somwhat uncorrelated actions here:
// - Switching control scheme
// - Explicitly pairing with given devices regardless if making sense with respect to control scheme