Skip to content

Commit bf89104

Browse files
author
Rene Damm
authored
FIX: DontIncludeInteractions being ignored (#1069).
1 parent fc5fd1d commit bf89104

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Assets/Tests/InputSystem/CoreTests_Actions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4845,7 +4845,7 @@ public void Actions_WhenGettingDisplayTextForBindingsOnAction_InteractionsAreSho
48454845

48464846
// Can suppress.
48474847
Assert.That(action1.GetBindingDisplayString(InputBinding.DisplayStringOptions.DontIncludeInteractions),
4848-
Is.EqualTo("Hold " + GamepadState.ButtonSouthShortDisplayName));
4848+
Is.EqualTo(GamepadState.ButtonSouthShortDisplayName));
48494849
}
48504850

48514851
[Test]

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ however, it has to be formatted properly to pass verification tests.
1818
- Leaving play mode no longer leaves state change monitors lingering around from enabled actions.
1919
- Enabling action maps with bindings that do not refer to an existing action in the map no longer leads to asserts and exceptions when input on the bindings is received ([case 1213085](https://issuetracker.unity3d.com/issues/input-system-input-actions-cause-exceptions-and-should-not-get-here-errors-to-appear-after-deleting-an-action-map)).
2020
- `PressInteraction` no longer misses the next button press if it gets reset from within the `performed` callback ([case 1205285](https://issuetracker.unity3d.com/issues/inputsystem-problem-with-button-state-after-deactivating-and-reactivating-an-action-map)).
21+
- `InputBinding.DisplayStringOptions.DontIncludeInteractions` is now properly respected.
2122
- Reading the value of a composite binding no longer causes processors from the last active part binding to be applied rather than the processors of the composite itself, if any ([case 1207082](https://issuetracker.unity3d.com/issues/input-system-invert-processors-have-no-effect-on-the-inputaction-dot-callbackcontext-value)).
2223

2324
## [1.0.0-preview.5] - 2020-02-14

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ public string ToDisplayString(out string deviceLayoutName, out string controlPat
694694

695695
var result = InputControlPath.ToHumanReadableString(pathToUse, out deviceLayoutName, out controlPath, readableStringOptions, control);
696696

697-
if (!string.IsNullOrEmpty(effectiveInteractions))
697+
if (!string.IsNullOrEmpty(effectiveInteractions) && (options & DisplayStringOptions.DontIncludeInteractions) == 0)
698698
{
699699
var interactionString = string.Empty;
700700
var parsedInteractions = NameAndParameters.ParseMultiple(effectiveInteractions);

0 commit comments

Comments
 (0)