Commit Graph

323 Commits

Author SHA1 Message Date
ben hoffman
2c703fd02e Set bAutomaticallyRegisterInputOnConstruction to true on every legacy input node as well to ensure that they get bound during compilation. This is required to allow the use of these legacy key nodes in widget blueprints after the changes made in 35418847 to automatically create the widget blueprint bindings during Blueprint compilation.
#rb dan.oconnor
#rnx

[CL 36334764 by ben hoffman in 5.5 branch]
2024-09-17 10:46:25 -04:00
ben hoffman
71bc55ce97 Remove some deprecated functions from Enhnaced Input subsystem interface from 5.2 and 5.3
#rnx
#rb justin.hare

[CL 35653850 by ben hoffman in ue5-main branch]
2024-08-20 10:00:15 -04:00
ben hoffman
982ea10f95 Automatically set bAutomaticallyRegisterInputOnConstruction on widgets during compilation if there are any enhanced input nodes connected
#jira UE-188341
#rb dan.oconnor
#rnx

[CL 35573551 by ben hoffman in ue5-main branch]
2024-08-15 15:23:14 -04:00
ben hoffman
4c402e3cb4 Remove the "Experimental" tag from player mappable key types. These are heavily in use and are no longer experimental
#rnx

[CL 35464732 by ben hoffman in ue5-main branch]
2024-08-12 15:58:37 -04:00
ben hoffman
5d2571bb36 Use the widgets InputComponent instead of the player controllers when binding input events to it. This resolves an issue where widgets would always be binding inputs in enhanced input, but never actually unbinding them because the player controller input component was not being destroyed.
In order to use Enhanced Input event nodes in a widget, you must set the bAutomaticallyRegisterInputOnConstruction value to true on your widget. If you do not, then you will receive BP compilation errors.

You can use the "enhancedInput.bp.ShouldValidateWidgetBlueprintSettings" cvar to disable the BP errors if desired.

#jira UE-188341
#rb daren.cheng, jodon.karlik

[CL 35418859 by ben hoffman in ue5-main branch]
2024-08-09 07:32:52 -04:00
dave jones2
c4107f5283 UE-196156 - Add exec toggle for pure nodes
Blueprint pure nodes were initially intended to be similar to "functional pure". In other words, they're deterministic and produce no side effects (eg: doesn't mutate state). However, pure nodes have violated both conditions for a while now.

Instead, pure nodes are simply function nodes with output values and no visible exec pins. While this can be convenient, they come with a downside: the pure node is evaluated for each connected output. This can lead to unexpected performance issues if the node is expensive to evaluate. In the case of non-deterministic nodes, this can lead to unexpected behavior. In both cases, the user often needs to cull multiple outputs of a pure node and cache the result manually.

The solution here is to add support for toggling purity at the call site. When a function node is placed, right-clicking on it and selecting either "Hide Exec pins" or "Show Exec Pins" will toggle purity. Additionally, the meaning of BlueprintPure and the "Pure" check box changes slightly: it now means that the function node _defaults_ to a pure state when placed in a graph. However, it can be toggled to show its exec pins.

In future changes, we'll also reevaluate which common library functions should continue to default as pure.

#jira UE-196156
#rb dan.oconnor, jodon.karlik, ben.zeigler

[CL 35309072 by dave jones2 in ue5-main branch]
2024-08-05 11:58:15 -04:00
ben hoffman
c2725f2269 Add a "UnscaledRadial" deadzone option for games with simpler requirements, or for users who just prefer that type of deadzone.
This deadzone will block any input values if their magnitude is less then a lower threshold, and clamp the values to an upper threshold.

#jira UE-217544
#rb nate.strohmyer

[CL 35019067 by ben hoffman in ue5-main branch]
2024-07-23 10:39:30 -04:00
ben hoffman
f47b82ed3b Fix a input injection commands where, if you were doing it for an anlog key, it would not apply immediately. This was happening because the "Delta" value would not be applied for analog key , and we needed to force a re-evaluation of the event accumulator.
#jira UE-216783
#rnx
#rb dan.oconnor

[CL 34902136 by ben hoffman in ue5-main branch]
2024-07-18 11:14:39 -04:00
zousar shaker
dffd381e7d TObjectPtr upgrades for engine plugins.
[CL 34894832 by zousar shaker in ue5-main branch]
2024-07-18 01:17:14 -04:00
ben hoffman
dff3cb583a Remove the additional "console variable" metadata from the EI editor settings as they did not really work intuitively. This will ensure that your editor prefs persist between sessions. If you wish to set these settings in a config file, then you can do so with the normal object sytax:
[/Script/InputEditor.EnhancedInputEditorProjectSettings]
  bAutomaticallyStartConsumingInput=true
  bLogAllInput=true

#jira UE-218081
#rb jodon.karlik

[CL 34884119 by ben hoffman in ue5-main branch]
2024-07-17 16:28:14 -04:00
ben hoffman
3b8ebf097f Fix a crash when having a null trigger on a chorded input action.
#jira UE-219379
#rnx
#rb nate.strohmyer

[CL 34873202 by ben hoffman in ue5-main branch]
2024-07-17 13:10:21 -04:00
velin tchalakov
0b1009c1b8 [Input] Updating scale input modifier to be EditAnywhere.
-This allows non instanced objects (such as widgets that will inject touch input), to be able to use the scale modifier.

#tests Changed to EditAnywhere, and observed that no data loss occured in PIE
#rb ben.hoffman

[CL 34433850 by velin tchalakov in ue5-main branch]
2024-06-17 14:46:56 -04:00
ben hoffman
0b8c9fb766 Fix the EI User settings using the wrong default class. It was referring to the developer settings instead of the user settings!
#rnx
#rb jodon.karlik, justin.hare

[CL 34341402 by ben hoffman in ue5-main branch]
2024-06-13 11:17:29 -04:00
ben hoffman
6c91a85d7e Handle the case where you change the Enhanced input User settings class in the editor and now need to create a different settings save object.
#jira UE-216386
#rb jodon.karlik

[CL 34286847 by ben hoffman in ue5-main branch]
2024-06-11 15:18:06 -04:00
nate strohmyer
ffdc502fae Enhanced Input: Fixing issue with combo triggers not firing completed event when first and last combo action are the same action
#Jira UE-187065
#rb ben.hoffman

[CL 33898078 by nate strohmyer in ue5-main branch]
2024-05-24 12:48:20 -04:00
ben hoffman
d162291504 Add a test for the performance of evaluating input modifiers in Enhanced Input. This test will just tick the player input with a few input modifiers a bunch of times and report the min, max, and median timings for it.
This will make for a good A/B test when optimizing modifiers, which at the moment are the most expensive part of enhanced input ticking.

#rb justin.hare
#rnx

[CL 33872525 by ben hoffman in ue5-main branch]
2024-05-23 15:53:08 -04:00
ben hoffman
c1e2e3a993 Enhanced Input optimization: Cache if a key mapping has any "Always tick" triggers set on it instead of looping through all triggers for each key mapping in UEnhancedPlayerInput::ProcessActionMappingEvent
#rnx
#rb dan.oconnor

[CL 33767996 by ben hoffman in ue5-main branch]
2024-05-20 11:21:57 -04:00
robert manuszewski
3a4c065dba Restoring EInternalObjectFlags::Unreachable to make sure FObjectItem::IsUnreachable() is thread safe.
Deprecated GReachableObjectFlag, GMaybeUnreachableObjectFlag and GUnreachableObjectFlag. Moved the first two to an internal FGCFlags class which is the only thing that can manipulate GC reachability flags.

Deprecated a bunch of FUObjectItem functions that could manipulate reachability flags. These functions will be removed in UE 5.6.

#rb danny.couture, Johan.Torp

[CL 33716377 by robert manuszewski in ue5-main branch]
2024-05-17 03:32:15 -04:00
ben hoffman
84298eea6b Add a "FlushPressedKeys" function to the Enhanced Input BP library
#jira UE-214065
#rb Phillip.Kavan
#rnx

[CL 33555836 by ben hoffman in ue5-main branch]
2024-05-09 15:29:53 -04:00
najmm01
260c46e74c PR #11801: Small but major fix for Smooth Delta Input Modifier
#jira UE-213379
#rnx

[CL 33309555 by najmm01 in ue5-main branch]
2024-04-29 15:04:09 -04:00
ben hoffman
0c75ece16d Add LLM memory tags for EKeys and the FKeyManager to reduce the number of "untagged" allocations
#jira UE-154196
#rnx
#rb Phillip.Kavan

[CL 33307946 by ben hoffman in ue5-main branch]
2024-04-29 14:17:12 -04:00
ben hoffman
3e507858f1 Ensure that the "Canceled" event gets fired if you have a trigger that is ongoing, but gets removed by a mapping context change. Now, instead of removing the input action directly from the ActionInstanceData map, we will reset it's value to zero and mark it for removal. This has the affect of, on the next evaluation of input, we see the value go to zero, and the triggers should evaluate to the canceled state.
This behavior can be disabled by setting the CVar "EnhancedInput.ReconcileRemovedMappingDelegates" to false. This CVar will likely be removed in the future after 2 release versions of the engine to give any dependancies to this broken behavior an opt-out to fix up any broken code.

#jira UE-211095
#rb Phillip.Kavan

[CL 33264498 by ben hoffman in ue5-main branch]
2024-04-26 10:46:31 -04:00
ben hoffman
4f82581569 Mutate the state of that FInputActionInstance struct to ensure that it is the correct trigger event depending on the delegat when an input action is triggered and started on the same frame.
#jira UE-212308
#jira UE-207780
#rb nate.strohmyer

[CL 33116302 by ben hoffman in ue5-main branch]
2024-04-19 16:49:19 -04:00
ben hoffman
26111d7c6d Add a LexToString for ETriggerEvent that will print out the value of a bitmask for the trigger state.
#rnx
#rb dan.oconnor

[CL 33114104 by ben hoffman in ue5-main branch]
2024-04-19 15:52:31 -04:00
ben hoffman
a84656a4de Clamp the lower threshold of deadzone properties if you modify the upper threshold to be higher as well.
#jira UE-211968
#rnx

[CL 32940658 by ben hoffman in ue5-main branch]
2024-04-12 15:25:33 -04:00