Skip to content
Merged
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
24 changes: 24 additions & 0 deletions Assets/Tests/InputSystem/Plugins/PlayerInputTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2328,6 +2328,30 @@ public void PlayerInput_WhenOverridingDeviceLayout_LostDeviceShouldBeResolvedAnd
}
";

[Test]
[Category("PlayerInput")]
public void PlayerInput_CanDisableAfterAssigningAction_WithControlSchemesAndInteractions()
{
var gamepad = InputSystem.AddDevice<Gamepad>();
var keyboard = InputSystem.AddDevice<Keyboard>();

var actions = ScriptableObject.CreateInstance<InputActionAsset>();
var action = actions.AddActionMap("map").AddAction("action", interactions: "Tap(duration=0.123)");
action.AddBinding("<Gamepad>/buttonSouth", groups: "Gamepad");
action.AddBinding("<Keyboard>/space", groups: "Keyboard");
actions.AddControlScheme("Gamepad")
.WithRequiredDevice<Gamepad>();
actions.AddControlScheme("Keyboard")
.WithRequiredDevice<Keyboard>();
actions.Enable();

var player = new GameObject();
var playerInput = player.AddComponent<PlayerInput>();
playerInput.defaultControlScheme = "Keyboard";
playerInput.actions = actions;
player.SetActive(false); // Should cause full rebinding and not assert
}

private struct Message : IEquatable<Message>
{
public string name { get; set; }
Expand Down
1 change: 1 addition & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ however, it has to be formatted properly to pass verification tests.
### Fixed
- Fixed `ArgumentNullException` when opening the Prefab Overrides window and selecting a component with an `InputAction`.
- Fixed `{fileID: 0}` getting appended to `ProjectSettings.asset` file when building a project ([case ISXB-296](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-296)).
- Fixed `Type of instance in array does not match expected type` assertion when using PlayerInput in combination with Control Schemes and Interactions ([case ISXB-282](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-282)).

## [1.4.3] - 2022-09-23

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ internal bool LazyResolveBindings(bool fullResolve)
// created. Unfortunately, this can lead to some unnecessary re-resolving.

needToResolveBindings = true;
bindingResolutionNeedsFullReResolve = fullResolve;
bindingResolutionNeedsFullReResolve |= fullResolve;

if (s_DeferBindingResolution > 0)
return false;
Expand Down