Commit Graph

312 Commits

Author SHA1 Message Date
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
ben hoffman
6c2dac5c29 Remove any input components from the Player Controller's input stack if they are marked as RF_MirroredGarbage. This can happen if you have "Input Enabled" actor added to the world, and it is removed in response to an earlier input component deleting it's owning actor.
#jira UE-211933
#rb jodon.karlik

[CL 32891068 by ben hoffman in ue5-main branch]
2024-04-11 11:08:01 -04:00
ben hoffman
ccedb61ed2 Do not allow you to make the lower threshold higher then the upper threshold on Dead Zone input modifiers.
#jira UE-208154
#rb dan.oconnor

[CL 32695879 by ben hoffman in ue5-main branch]
2024-04-03 09:21:19 -04:00
ben hoffman
b23399de6b Make the InputKey property on UK2Node_InputDebugKey Visible only, not editable. This fixes a bug where you could select the unsupported "Any Key" option from the key selector.
#jira UE-210443
#rb nate.strohmyer, Phillip.Kavan

[CL 32646074 by ben hoffman in ue5-main branch]
2024-04-01 14:33:13 -04:00
ben zeigler
7495e4cc00 Change FTickableGameObjects that use the soon-to-be-deprecated IsAllowedToTick to instead use IsTickable if it is actually needed
#jira UE-204963
#rb ben.hoffman

[CL 32402603 by ben zeigler in ue5-main branch]
2024-03-21 12:04:02 -04:00
ben hoffman
3137e3718d Only ensure in game builds on the EI User Setting serialize function.
#rnx

[CL 31776030 by ben hoffman in ue5-main branch]
2024-02-23 16:03:32 -05:00
steve robb
f8d47335a4 Replaced RemoveAt(N, 1, EAllowShrinking::*) with RemoveAt(N, EAllowShrinking::*).
[CL 31626444 by steve robb in ue5-main branch]
2024-02-19 16:51:58 -05:00
santiago firpo
875c90aeb0 Added missing UPROPERTY on injected input property chain to fix GC-related crash
[CL 31624149 by santiago firpo in ue5-main branch]
2024-02-19 16:05:06 -05:00
ben hoffman
4cf4b69897 [Backout] Part of - CL31224705
-----------------------------------------
Ensure that we set bShouldBeIgnored AFTER we retain the state of old triggers and modifiers. Otherwise we would never actually update the state of the mapping's bShouldBeIgnored flag and it would always be false. I believe that this issue was introduced with 24566913. Once we got the right behavior for that comparison operator, then the mapping would always be converted instead of the old behavior where it would not. This resulted in it overriding the bShouldBeIgnored flag to whatever the previous state was.

#jira UE-196939
#jira UE-206413
#rnx
[FYI] Richard.Graham

[CL 31354440 by ben hoffman in ue5-main branch]
2024-02-09 15:55:17 -05:00
ben hoffman
e763c9b160 Do not attempt to load the project default IMC assets on the CDO of UEnhancedPlayerInput. Doing so will result in any subobjects of the IMC (triggers, modifiers, player mappable key settings) being null at the time of loadng if they are outside the Enhanced Input module. We can't gaurantee that the load order of these modules such that they would be available before the EI module is being loaded, so we can just skip them here.
#jira UE-199784

#changelist validated
#virtualized

[CL 31233426 by ben hoffman in ue5-main branch]
2024-02-06 17:23:24 -05:00
ben hoffman
64be6db96f Update the comments on bIgnoreAllPressedKeysUntilRelease to be clear and provide some examples.
Ensure that we set bShouldBeIgnored AFTER we retain the state of old triggers and modifiers. Otherwise we would never actually update the state of the mapping's bShouldBeIgnored flag and it would always be false. I believe that this issue was introduced with 24566913. Once we got the right behavior for that comparison operator, then the mapping would always be converted instead of the old behavior where it would not. This resulted in it overriding the bShouldBeIgnored flag to whatever the previous state was.

#jira UE-196939
#rb dan.oconnor


#changelist validated
#virtualized

[CL 31227708 by ben hoffman in ue5-main branch]
2024-02-06 15:18:26 -05:00
steve robb
f029468598 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30729174 by steve robb in ue5-main branch]
2024-01-19 16:41:35 -05:00