diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index c5c45b05e7..01be12e01b 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -21,6 +21,7 @@ however, it has to be formatted properly to pass verification tests. ### Changed - Renamed editor Resources directories to PackageResources to fix package validation warnings. - Changed representation of GamepadButton enum values in Inspector to display aliased enum values as a single item to avoid confusion around selection and aliased value display when multiple enum items map to the same numerical value. [ISXB-543](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-543) +- PlayerInput component now warns if the system cannot find matching control scheme, which can occur if all control schemes already paired (e.g. to other game objects with PlayerInput components) [ISXB-1020](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1020) ## [1.11.0] - 2024-09-10 diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInput.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInput.cs index 0dbfc82e16..df23a4ff96 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInput.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInput.cs @@ -1463,7 +1463,15 @@ private void AssignUserAndDevices() { var controlScheme = InputControlScheme.FindControlSchemeForDevices(availableDevices, m_Actions.controlSchemes); if (controlScheme != null) + { TryToActivateControlScheme(controlScheme.Value); + } + else + { + // The device count check is here to allow the unit tests to pass (and not trigger this error message) + if (InputSystem.devices.Count > 0 && availableDevices.Count == 0) + Debug.LogWarning($"Cannot find matching control scheme for {this.name} (all control schemes are already paired to matching devices)", this); + } } } }