Skip to content
Open
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
ede1b9f
Update documentation for press point usage & default settings thresho…
Darren-Kelly-Unity Apr 28, 2026
4786635
Add fix for Vector2Controls & StickControls not using pressPoint's th…
Darren-Kelly-Unity Apr 29, 2026
85e63df
Add documentation for changes.
Darren-Kelly-Unity Apr 29, 2026
9255610
Separate and add tests for press point actuation.
Darren-Kelly-Unity Apr 29, 2026
3a30637
Merge branch 'develop' into bugfix/uum-138143-button-press-points-for…
Darren-Kelly-Unity May 5, 2026
1edbc32
Remove old comment in test.
Darren-Kelly-Unity May 5, 2026
f5500dc
Add formatting!
Darren-Kelly-Unity May 6, 2026
6b3acd1
Merge branch 'develop' into bugfix/uum-138143-button-press-points-for…
Darren-Kelly-Unity May 6, 2026
89c29e4
Merge branch 'develop' into bugfix/uum-138143-button-press-points-for…
Darren-Kelly-Unity May 11, 2026
509fd55
Add test format commit!
Darren-Kelly-Unity May 11, 2026
04e7d31
Add missing meta files.
Darren-Kelly-Unity May 11, 2026
fb11b47
Add more meta files. Not sure why they show up though.
Darren-Kelly-Unity May 11, 2026
2e84fa9
Remove redundant IActuationPressPoint.pressPointOrDefault property as…
Darren-Kelly-Unity May 11, 2026
577945b
Move positioning of press point forwarding properties.
Darren-Kelly-Unity May 11, 2026
e09e2c1
Revert weird meta file changes.
Darren-Kelly-Unity May 11, 2026
24300ba
Update whitespace changes for InputAction.cs
Darren-Kelly-Unity May 11, 2026
d392a56
Fix more white space formatting issues.
Darren-Kelly-Unity May 11, 2026
b1fbc4f
Fix StickControl white space.
Darren-Kelly-Unity May 11, 2026
0e622e4
Fix whitespace in Vector2Control.cs
Darren-Kelly-Unity May 11, 2026
f323b65
Fix more whitespace.
Darren-Kelly-Unity May 11, 2026
e4f0290
Remove fomratting issues with InputControlExtensions.cs
Darren-Kelly-Unity May 11, 2026
bb4e745
Add another batch of whitespace fixing.
Darren-Kelly-Unity May 11, 2026
773a44a
Update Packages/com.unity.inputsystem/InputSystem/Runtime/Controls/Ve…
Darren-Kelly-Unity May 12, 2026
6a08e2f
Update Packages/com.unity.inputsystem/InputSystem/Runtime/Controls/Ve…
Darren-Kelly-Unity May 12, 2026
ceb494c
Fix more whitespace issues.
Darren-Kelly-Unity May 12, 2026
2b72b4e
Fix compiler error.
Darren-Kelly-Unity May 12, 2026
ef60059
Make IActuationPressPoint.cs internal.
Darren-Kelly-Unity May 12, 2026
d7d7762
Refactor and add documentation for PR review.
Darren-Kelly-Unity May 12, 2026
c1cf34d
Refactor for code review.
Darren-Kelly-Unity May 12, 2026
26e92f4
Add performance tests addressing Hakan's worrys about hot path issues.
Darren-Kelly-Unity May 12, 2026
bce3776
Test updating codecov.yml to see if code coverage shown improves.
Darren-Kelly-Unity May 12, 2026
7209d0c
Revert "Test updating codecov.yml to see if code coverage shown impro…
Darren-Kelly-Unity May 12, 2026
674c649
Update documentation.
Darren-Kelly-Unity May 12, 2026
1243bc4
Test yamato configuration to exlude tests to see if it improves test …
Darren-Kelly-Unity May 12, 2026
db81e01
Revert "Test yamato configuration to exlude tests to see if it improv…
Darren-Kelly-Unity May 12, 2026
8ff8746
Revert "Revert "Test yamato configuration to exlude tests to see if i…
Darren-Kelly-Unity May 12, 2026
a9facb6
Revert "Revert "Revert "Test yamato configuration to exlude tests to …
Darren-Kelly-Unity May 12, 2026
3806cd9
Fix missing api links due to internal switch of IActuationPressPoint.
Darren-Kelly-Unity May 13, 2026
76df896
Remove reundant meta file.
Darren-Kelly-Unity May 13, 2026
d0f1978
Merge branch 'develop' into bugfix/uum-138143-button-press-points-for…
Pauliusd01 May 15, 2026
cae3ba8
Merge branch 'develop' into bugfix/uum-138143-button-press-points-for…
Darren-Kelly-Unity May 15, 2026
332ee3b
Merge branch 'develop' into bugfix/uum-138143-button-press-points-for…
Darren-Kelly-Unity May 15, 2026
e9e5613
Update Packages/com.unity.inputsystem/Documentation~/RespondingToActi…
Darren-Kelly-Unity May 18, 2026
35097bb
Update Packages/com.unity.inputsystem/Documentation~/RespondingToActi…
Darren-Kelly-Unity May 18, 2026
00528c5
Update Packages/com.unity.inputsystem/InputSystem/Runtime/Controls/Ve…
Darren-Kelly-Unity May 18, 2026
5f5b474
Make press point property internal.
Darren-Kelly-Unity May 18, 2026
53e8efe
Fix compiler issues.
Darren-Kelly-Unity May 18, 2026
8881e3c
Formatting
Darren-Kelly-Unity May 19, 2026
ee70ced
Fix documentation formatting.
Darren-Kelly-Unity May 19, 2026
fdea0bc
Add code review changes Hakan requested.
Darren-Kelly-Unity May 19, 2026
ee0f8f5
Add doc changes and changelog entry.
Darren-Kelly-Unity May 19, 2026
b466193
Changes for code review with discussion with Hakan.
Darren-Kelly-Unity May 20, 2026
b9a2edf
Update documentation.
Darren-Kelly-Unity May 20, 2026
52279d1
Update documentation RespondingToActions.md
Darren-Kelly-Unity May 20, 2026
174397d
Update changelog.
Darren-Kelly-Unity May 20, 2026
6e1ab2d
Remove redundant performance tests added due to code change following…
Darren-Kelly-Unity May 20, 2026
2c731c2
Add performance test to be sure we aren't allocating memory on the ho…
Darren-Kelly-Unity May 20, 2026
e8aa7eb
Remove redundant category.
Darren-Kelly-Unity May 20, 2026
373877d
Remove empty folder after refactor.
Darren-Kelly-Unity May 20, 2026
fcb1c38
Fix missing crefs.
Darren-Kelly-Unity May 20, 2026
a73b5f5
Fix failing CI due to docs
Darren-Kelly-Unity May 20, 2026
82d6127
Fix duplicated comment for documentation and used a cref on IsPressed…
Darren-Kelly-Unity May 21, 2026
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
570 changes: 570 additions & 0 deletions Assets/Tests/InputSystem/ActuationPressPointTests.cs

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions Assets/Tests/InputSystem/ActuationPressPointTests.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

346 changes: 128 additions & 218 deletions Assets/Tests/InputSystem/CoreTests_Actions.cs

Large diffs are not rendered by default.

144 changes: 28 additions & 116 deletions Assets/Tests/InputSystem/CoreTests_Controls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ public void Controls_CanHaveStickDeadzones()
InputSystem.RegisterLayout(json);
var device = (Gamepad)InputSystem.AddDevice("MyDevice");

var firstState = new GamepadState {leftStick = new Vector2(0.05f, 0.05f)};
var secondState = new GamepadState {leftStick = new Vector2(0.5f, 0.5f)};
var firstState = new GamepadState { leftStick = new Vector2(0.05f, 0.05f) };
var secondState = new GamepadState { leftStick = new Vector2(0.5f, 0.5f) };

InputSystem.QueueStateEvent(device, firstState);
InputSystem.Update();
Expand Down Expand Up @@ -257,12 +257,12 @@ public void Controls_CanHaveAxisDeadzones()
////NOTE: Unfortunately, this relies on an internal method ATM.
var processor = device.leftTrigger.TryGetProcessor<AxisDeadzoneProcessor>();

InputSystem.QueueStateEvent(device, new GamepadState {leftTrigger = 0.05f});
InputSystem.QueueStateEvent(device, new GamepadState { leftTrigger = 0.05f });
InputSystem.Update();

Assert.That(device.leftTrigger.ReadValue(), Is.Zero.Within(0.0001));

InputSystem.QueueStateEvent(device, new GamepadState {leftTrigger = 0.5f});
InputSystem.QueueStateEvent(device, new GamepadState { leftTrigger = 0.5f });
InputSystem.Update();

Assert.That(device.leftTrigger.ReadValue(),
Expand All @@ -284,13 +284,13 @@ public void Controls_CanChangeDefaultDeadzoneValuesOnTheFly()
Set(gamepad.leftStick, new Vector2(0.5f, 0.5f));

Assert.That(gamepad.leftStick.ReadValue(),
Is.EqualTo(new StickDeadzoneProcessor {min = 0.1f, max = 0.9f}.Process(new Vector2(0.5f, 0.5f))));
Is.EqualTo(new StickDeadzoneProcessor { min = 0.1f, max = 0.9f }.Process(new Vector2(0.5f, 0.5f))));

InputSystem.settings.defaultDeadzoneMin = 0.2f;
InputSystem.settings.defaultDeadzoneMax = 0.8f;

Assert.That(gamepad.leftStick.ReadValue(),
Is.EqualTo(new StickDeadzoneProcessor {min = 0.2f, max = 0.8f}.Process(new Vector2(0.5f, 0.5f))));
Is.EqualTo(new StickDeadzoneProcessor { min = 0.2f, max = 0.8f }.Process(new Vector2(0.5f, 0.5f))));
}

[Test]
Expand All @@ -299,7 +299,7 @@ public void Controls_SticksProvideAccessToHalfAxes()
{
var gamepad = InputSystem.AddDevice<Gamepad>();

InputSystem.QueueStateEvent(gamepad, new GamepadState {leftStick = new Vector2(0.5f, 0.5f)});
InputSystem.QueueStateEvent(gamepad, new GamepadState { leftStick = new Vector2(0.5f, 0.5f) });
InputSystem.Update();

Assert.That(gamepad.leftStick.up.ReadValue(),
Expand All @@ -311,7 +311,7 @@ public void Controls_SticksProvideAccessToHalfAxes()
Assert.That(gamepad.leftStick.left.ReadValue(),
Is.EqualTo(new AxisDeadzoneProcessor().Process(0.0f)));

InputSystem.QueueStateEvent(gamepad, new GamepadState {leftStick = new Vector2(-0.5f, -0.5f)});
InputSystem.QueueStateEvent(gamepad, new GamepadState { leftStick = new Vector2(-0.5f, -0.5f) });
InputSystem.Update();

Assert.That(gamepad.leftStick.up.ReadValue(),
Expand Down Expand Up @@ -468,7 +468,7 @@ public unsafe void Controls_ValueIsReadFromStateMemoryOnlyWhenControlHasBeenMark
gamepad.ApplyParameterChanges();
Assert.That(gamepad.leftTrigger.value, Is.EqualTo(0.5f));

InputSystem.QueueStateEvent(gamepad, new GamepadState {leftTrigger = 0.75f});
InputSystem.QueueStateEvent(gamepad, new GamepadState { leftTrigger = 0.75f });
InputSystem.Update();

// but this time, we updated state through the system which *does* set the stale flag on controls that
Expand Down Expand Up @@ -611,7 +611,7 @@ public void Controls_CanReadValueFromStateEvents()
Assert.That(gamepad.leftTrigger.ReadValueFromEventAsObject(eventPtr), Is.EqualTo(0.234f).Within(0.00001));
};

InputSystem.QueueStateEvent(gamepad, new GamepadState {leftTrigger = 0.234f});
InputSystem.QueueStateEvent(gamepad, new GamepadState { leftTrigger = 0.234f });
InputSystem.Update();

Assert.That(receivedCalls, Is.EqualTo(1));
Expand Down Expand Up @@ -758,7 +758,7 @@ public void Controls_DpadVectorsAreCircular()
var gamepad = InputSystem.AddDevice<Gamepad>();

// Up.
InputSystem.QueueStateEvent(gamepad, new GamepadState {buttons = 1 << (int)GamepadButton.DpadUp});
InputSystem.QueueStateEvent(gamepad, new GamepadState { buttons = 1 << (int)GamepadButton.DpadUp });
InputSystem.Update();

Assert.That(gamepad.dpad.ReadValue(), Is.EqualTo(Vector2.up));
Expand All @@ -775,7 +775,7 @@ public void Controls_DpadVectorsAreCircular()
Assert.That(gamepad.dpad.ReadValue().y, Is.EqualTo((Vector2.up + Vector2.left).normalized.y).Within(0.00001));

// Left.
InputSystem.QueueStateEvent(gamepad, new GamepadState {buttons = 1 << (int)GamepadButton.DpadLeft});
InputSystem.QueueStateEvent(gamepad, new GamepadState { buttons = 1 << (int)GamepadButton.DpadLeft });
InputSystem.Update();

Assert.That(gamepad.dpad.ReadValue(), Is.EqualTo(Vector2.left));
Expand All @@ -792,7 +792,7 @@ public void Controls_DpadVectorsAreCircular()
Assert.That(gamepad.dpad.ReadValue().y, Is.EqualTo((Vector2.down + Vector2.left).normalized.y).Within(0.00001));

// Down.
InputSystem.QueueStateEvent(gamepad, new GamepadState {buttons = 1 << (int)GamepadButton.DpadDown});
InputSystem.QueueStateEvent(gamepad, new GamepadState { buttons = 1 << (int)GamepadButton.DpadDown });
InputSystem.Update();

Assert.That(gamepad.dpad.ReadValue(), Is.EqualTo(Vector2.down));
Expand All @@ -811,7 +811,7 @@ public void Controls_DpadVectorsAreCircular()
Is.EqualTo((Vector2.down + Vector2.right).normalized.y).Within(0.00001));

// Right.
InputSystem.QueueStateEvent(gamepad, new GamepadState {buttons = 1 << (int)GamepadButton.DpadRight});
InputSystem.QueueStateEvent(gamepad, new GamepadState { buttons = 1 << (int)GamepadButton.DpadRight });
InputSystem.Update();

Assert.That(gamepad.dpad.ReadValue(), Is.EqualTo(Vector2.right));
Expand Down Expand Up @@ -947,6 +947,7 @@ public void Controls_FindControl_FindsControlDespiteTurkishCulture()
Assert.That(matches, Has.Count.EqualTo(1));
Assert.That(matches, Has.Exactly(1).SameAs(gamepad.leftStick));
}

Thread.CurrentThread.CurrentCulture = culture;
}

Expand All @@ -973,6 +974,7 @@ public void Controls_CanParseControlPath(string path, params string[] parts)
case "displayName": return a.displayName == nameAndValue[1];
case "wildcard": return a.isWildcard;
}

return false;
});
}), Has.All.True);
Expand Down Expand Up @@ -1153,100 +1155,6 @@ public void Controls_CanFindControlsUsingWildcards_InMiddleOfNames()
}
}

[Test]
[Category("Controls")]
public void Controls_CanDetermineIfControlIsPressed()
{
InputSystem.settings.defaultButtonPressPoint = 0.5f;

var gamepad = InputSystem.AddDevice<Gamepad>();

Set(gamepad.leftStick, Vector2.one);
Set(gamepad.leftTrigger, 0.6f);
Press(gamepad.buttonSouth);

//// https://jira.unity3d.com/browse/ISX-926
////REVIEW: IsPressed() should probably be renamed. As is apparent from the calls here, it's not always
//// readily apparent that the way it is defined ("actuation level at least at button press threshold")
//// does not always connect to what it intuitively means for the specific control.

Assert.That(gamepad.leftTrigger.IsPressed(), Is.True);
Assert.That(gamepad.rightTrigger.IsPressed(), Is.False);
Assert.That(gamepad.buttonSouth.IsPressed(), Is.True);
Assert.That(gamepad.buttonNorth.IsPressed(), Is.False);
Assert.That(gamepad.leftStick.IsPressed(), Is.True); // Note how this diverges from the actual meaning of "is the left stick pressed?"
Assert.That(gamepad.rightStick.IsPressed(), Is.False);

// https://fogbugz.unity3d.com/f/cases/1374024/
// Calling it on the entire device should be false.
Assert.That(gamepad.IsPressed(), Is.False);
}

[Test]
[Category("Controls")]
public void Controls_CanCustomizeDefaultButtonPressPoint()
{
var gamepad = InputSystem.AddDevice<Gamepad>();

InputSystem.settings.defaultButtonPressPoint = 0.4f;

Set(gamepad.leftTrigger, 0.39f);

Assert.That(gamepad.leftTrigger.isPressed, Is.False);

Set(gamepad.leftTrigger, 0.4f);

Assert.That(gamepad.leftTrigger.isPressed, Is.True);

InputSystem.settings.defaultButtonPressPoint = 0.5f;

Assert.That(gamepad.leftTrigger.isPressed, Is.False);

InputSystem.settings.defaultButtonPressPoint = 0;

Assert.That(gamepad.leftTrigger.isPressed, Is.True);

// Setting the trigger to 0 requires the system to be "smart" enough to
// figure out that 0 as a default button press point doesn't make sense
// and that instead the press point should clamp off at some low, non-zero value.
// https://fogbugz.unity3d.com/f/cases/1349002/
Set(gamepad.leftTrigger, 0f);

Assert.That(gamepad.leftTrigger.isPressed, Is.False);

Set(gamepad.leftTrigger, 0.001f);

Assert.That(gamepad.leftTrigger.isPressed, Is.True);

InputSystem.settings.defaultButtonPressPoint = -1;
Set(gamepad.leftTrigger, 0f);

Assert.That(gamepad.leftTrigger.isPressed, Is.False);
}

[Test]
[Category("Controls")]
public void Controls_CanCustomizePressPointOfGamepadTriggers()
{
var json = @"
{
""name"" : ""CustomGamepad"",
""extend"" : ""Gamepad"",
""controls"" : [
{
""name"" : ""rightTrigger"",
""parameters"" : ""pressPoint=0.2""
}
]
}
";

InputSystem.RegisterLayout(json);
var gamepad = InputDevice.Build<Gamepad>("CustomGamepad");

Assert.That(gamepad.rightTrigger.pressPoint, Is.EqualTo(0.2f).Within(0.0001f));
}

[Test]
[Category("Controls")]
public void Controls_DisplayNameDefaultsToControlName()
Expand Down Expand Up @@ -1419,7 +1327,7 @@ public void Controls_CanKeepListsOfControls_WithoutAllocatingGCMemory()
Assert.That(list[3], Is.SameAs(keyboard));
Assert.That(() => list[4], Throws.TypeOf<ArgumentOutOfRangeException>());
Assert.That(list.ToArray(),
Is.EquivalentTo(new InputControl[] {gamepad.leftStick, null, keyboard.spaceKey, keyboard}));
Is.EquivalentTo(new InputControl[] { gamepad.leftStick, null, keyboard.spaceKey, keyboard }));
Assert.That(list.Contains(gamepad.leftStick));
Assert.That(list.Contains(null));
Assert.That(list.Contains(keyboard.spaceKey));
Expand All @@ -1436,27 +1344,27 @@ public void Controls_CanKeepListsOfControls_WithoutAllocatingGCMemory()
Assert.That(list[0], Is.SameAs(gamepad.leftStick));
Assert.That(list[1], Is.SameAs(keyboard.spaceKey));
Assert.That(() => list[2], Throws.TypeOf<ArgumentOutOfRangeException>());
Assert.That(list.ToArray(), Is.EquivalentTo(new InputControl[] {gamepad.leftStick, keyboard.spaceKey}));
Assert.That(list.ToArray(), Is.EquivalentTo(new InputControl[] { gamepad.leftStick, keyboard.spaceKey }));
Assert.That(list.Contains(gamepad.leftStick));
Assert.That(!list.Contains(null));
Assert.That(list.Contains(keyboard.spaceKey));
Assert.That(!list.Contains(keyboard));

list.AddRange(new InputControl[] {keyboard.aKey, keyboard.bKey}, count: 1, destinationIndex: 0);
list.AddRange(new InputControl[] { keyboard.aKey, keyboard.bKey }, count: 1, destinationIndex: 0);

Assert.That(list.Count, Is.EqualTo(3));
Assert.That(list.Capacity, Is.EqualTo(4));
Assert.That(list,
Is.EquivalentTo(new InputControl[]
{keyboard.aKey, gamepad.leftStick, keyboard.spaceKey}));
{ keyboard.aKey, gamepad.leftStick, keyboard.spaceKey }));

list.AddRange(new InputControl[] {keyboard.bKey, keyboard.cKey});
list.AddRange(new InputControl[] { keyboard.bKey, keyboard.cKey });

Assert.That(list.Count, Is.EqualTo(5));
Assert.That(list.Capacity, Is.EqualTo(10));
Assert.That(list,
Is.EquivalentTo(new InputControl[]
{keyboard.aKey, gamepad.leftStick, keyboard.spaceKey, keyboard.bKey, keyboard.cKey}));
{ keyboard.aKey, gamepad.leftStick, keyboard.spaceKey, keyboard.bKey, keyboard.cKey }));

using (var toAdd = new InputControlList<InputControl>(gamepad.buttonNorth, gamepad.buttonEast, gamepad.buttonWest))
list.AddSlice(toAdd, count: 1, destinationIndex: 1, sourceIndex: 2);
Expand All @@ -1465,13 +1373,17 @@ public void Controls_CanKeepListsOfControls_WithoutAllocatingGCMemory()
Assert.That(list.Capacity, Is.EqualTo(10));
Assert.That(list,
Is.EquivalentTo(new InputControl[]
{keyboard.aKey, gamepad.buttonWest, gamepad.leftStick, keyboard.spaceKey, keyboard.bKey, keyboard.cKey}));
{
keyboard.aKey, gamepad.buttonWest, gamepad.leftStick, keyboard.spaceKey, keyboard.bKey, keyboard.cKey
}));

list[0] = keyboard.zKey;

Assert.That(list,
Is.EquivalentTo(new InputControl[]
{keyboard.zKey, gamepad.buttonWest, gamepad.leftStick, keyboard.spaceKey, keyboard.bKey, keyboard.cKey}));
{
keyboard.zKey, gamepad.buttonWest, gamepad.leftStick, keyboard.spaceKey, keyboard.bKey, keyboard.cKey
}));

list.Clear();

Expand Down
2 changes: 2 additions & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed an issue where `UIToolkit` `ClickEvent` could be fired on Android after device rotation due to inactive touch state being replayed during action initial state checks [UUM-100125](https://jira.unity3d.com/browse/UUM-100125).
- Fixed InputSystem.onAnyButtonPress fails to trigger when the device receives a touch [UUM-137930](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-137930).
- Fixed an incorrect ArraysHelper.HaveDuplicateReferences implementation that didn't use its arguments right [ISXB-1792] (https://github.com/Unity-Technologies/InputSystem/pull/2376)
- Fixed `InputAction.IsPressed`, `WasPressedThisFrame`, and `WasReleasedThisFrame` using a `ButtonControl`'s `pressPoint` when a binding also had an explicit `PressInteraction` with its own `pressPoint`, which could make those APIs disagree with the interaction's press and release behavior. Action-level press APIs now follow the interaction threshold when both are set explicitly.

### Changed
- Action-level `IsPressed`, `WasPressedThisFrame`, and `WasReleasedThisFrame` for bindings to `Vector2Control` / `StickControl` no longer consult a per-control `pressPoint` on the vector (that field was removed). Use a `Press` interaction to set a custom threshold, or rely on `defaultButtonPressPoint`.
- Removed 32-bit compilation check for HID on Windows players, which had no impact anymore. (ISX-2543)
- Migrated sample scenes to use Universal Render Pipeline (URP) with Built-in Render Pipeline fallback shaders. The URP package is now required to run the samples. (ISX-2343)
- Changed the UI for `Actions.inputactions` asset to use UI Toolkit framework.
Expand Down
2 changes: 2 additions & 0 deletions Packages/com.unity.inputsystem/Documentation~/Interactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ If you haven't specifically added an Interaction to a Binding or its Action, the

You can use a [`PressInteraction`](xref:UnityEngine.InputSystem.Interactions.PressInteraction) to explicitly force button-like interactions. Use the [`behavior`](xref:UnityEngine.InputSystem.Interactions.PressInteraction.behavior) parameter to select if the Interaction should trigger on button press, release, or both.

If you stack several `Press` interactions on the same binding, each still runs with its own parameters. Separately, [`IsPressed`](xref:UnityEngine.InputSystem.InputAction.IsPressed), [`WasPressedThisFrame`](xref:UnityEngine.InputSystem.InputAction.WasPressedThisFrame), and [`WasReleasedThisFrame`](xref:UnityEngine.InputSystem.InputAction.WasReleasedThisFrame) pick a single actuation threshold by scanning interactions in list order and using the `pressPoint` from the first `Press` interaction whose `pressPoint` is greater than zero.

|__Parameters__|Type|Default value|
|---|---|---|
|[`pressPoint`](xref:UnityEngine.InputSystem.Interactions.PressInteraction.pressPoint)|`float`|[`InputSettings.defaultButtonPressPoint`](xref:UnityEngine.InputSystem.InputSettings.defaultButtonPressPoint)|
Expand Down
Loading
Loading