Commit Graph

284 Commits

Author SHA1 Message Date
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
oscar burga
50a511dcd3 EnhancedInputSubsystem continuous input injections are now handled through a managed map instead of adding and removing from root set to prevent GC.
FMockedEnhancedInputSubsystem is now a UCLASS so it can properly implement the managed map for the interface.

#rb ben.hoffman

#tests PIE touch input simulation, ran input automation tests

[CL 30241210 by oscar burga in ue5-main branch]
2023-12-11 12:22:35 -05:00
robert manuszewski
5acf09e035 Support for Incremental Gather Unreachable Objects
Split unreachable clusters destruction to DissolveUnreachableClusters (non-incremental as it's very fast)
Flipping MaybeUnreachable -> Unreachable flag is now a single Swap() function call (MaybeUnreachable / Unreachable flags are deprecated and replaced with interchangable Reachability flags)
GatherUnreachableObjects will now only gather unreachable objects for NotifyUnreachableObjects call and perf gains during unhashing and purging all objects.
Enable with gc.AllowIncrementalGather=1

#rb Johan.Torp, PJ.Kack

[CL 30033914 by robert manuszewski in ue5-main branch]
2023-12-01 04:39:57 -05:00
ben hoffman
166ec4d6b7 Fix a TObjectItr that returned too early on the EI world subsystem processor.
#rb ben.hoffman
#rnx

[FYI] marc.audy

[CL 29895116 by ben hoffman in ue5-main branch]
2023-11-22 15:00:05 -05:00
marc audy
763a611985 Fix C4072 warnings
#rnx

[CL 29852844 by marc audy in ue5-main branch]
2023-11-20 17:26:53 -05:00
ben hoffman
68c8183c8a Remove some spammy logs of the Ei world subsystem
#rb ben.zeigler
#rnx

[CL 29792757 by ben hoffman in ue5-main branch]
2023-11-16 17:18:24 -05:00
nicolas mercier
5d510acf6e Fix use-after-free issue. The "ConsumeKey" function can re-allocate the KeyStateMap because of the call to FindOrAdd, which would in turn invalidate the pointers in the "KeysWithEvents" map. Instead of calling consume key directly, we can just do a non-mutating call to "Find" instead.
#rb
#rnx
#tests Running the game with address sanitizer on
#localization none

[CL 29659518 by nicolas mercier in ue5-main branch]
2023-11-10 18:03:27 -05:00
ben hoffman
6345a2b3ca Add a cvar to check to enable checking for keys mapped to EKeys::Invalid.
It isn't technically incorrect for an IMC to contain a mapping to the invalid key, but it can be hard to track down which mapping is empty if you are working at a large scale. This check will hopefully make it easier to find.

#rb Phillip.Kavan

[CL 29243815 by ben hoffman in ue5-main branch]
2023-10-30 15:14:27 -04:00
tiago binz
4f5c9f3583 Adding input modifiers and triggers to root set when injecting continuous inputs to prevent them from getting GCed.
This was resulting in crashes in Android and PIE with touch input simulation due to touch input modifiers becoming unreachable / deleted while they were still in use.

#rb ben.hoffman

[CL 28926504 by tiago binz in ue5-main branch]
2023-10-19 14:16:58 -04:00
ben hoffman
1a67e02b44 Mark the SavedKeyProfiles property as "Transient" instead of "SaveGame" to avoid it attempted to be serialized by the USaveGame base class. We manually serialize this in the UEnhancedInputUserSettings::Serialize function instead. This resolves some warning logs that would come up only on the first PIE of attempting to load a settings save game file.
#jira UE-195588
#rb Graham.Matuszewski
#rnx

[CL 28584346 by ben hoffman in ue5-main branch]
2023-10-09 11:39:14 -04:00
ben hoffman
8b41f3f6f6 Properly Respect the "bAddImmediately' flag on Default IMC's
#rb ben.hoffman
#rnx

[CL 28150606 by ben hoffman in ue5-main branch]
2023-09-22 15:26:41 -04:00
ben hoffman
4aa0787d90 Add a flag on Default Mapping Contexts for Enhanced Input to register with the User Input settings by default.
#rb jules.blok

[CL 28051194 by ben hoffman in ue5-main branch]
2023-09-20 15:33:58 -04:00
ben hoffman
72dfe2afa4 Remove TODO comment that doesnt need to be there and provide some more info about the actual property
#rb trivial
#rnx

[CL 28047109 by ben hoffman in ue5-main branch]
2023-09-20 14:24:36 -04:00
marius ursu
0bbcd408aa Add a "UpdateValueOfContinuousInputInjection" function to allow for you to update the value of a continuously injected input action and preserving the trigger/modifier state. This effectivly allows for modifier and trigger support via input injection because the EI subsystem will keep the state of those modifiers.
The use case for this is mobile UI where you want to use an input trigger for something like a gesture and you want the input trigger to be created once for a thumbstick and a touch screen.

Copying the values of triggers and modifiers in the ContinousInjection so that we can evaluate a new state instead of using the old one

#jira UE-194659
#rb [at]Ben.Hoffman

[CL 28038276 by marius ursu in ue5-main branch]
2023-09-20 11:40:26 -04:00
LtRandolph
e89de53409 [Backout] - CL27999507
Backing this out because it caused any existing BP modifier implementations to have cook errors. Instead of removing the const we would need to properly deprecate it and make a new version to support old content

#jira UE-195954
[FYI] ben.hoffman
Original CL Desc
-----------------------------------------------------------------
PR #10879: Make UInputModifier::ModifyRaw non-const

#rb me
#jira UE-195489

[CL 28038090 by LtRandolph in ue5-main branch]
2023-09-20 11:37:36 -04:00
LtRandolph
e3d9d68f2f PR #10879: Make UInputModifier::ModifyRaw non-const
#rb me
#jira UE-195489

[CL 27999552 by LtRandolph in ue5-main branch]
2023-09-19 12:23:16 -04:00
ben hoffman
ccece82f78 Use the new "GetOptions" metadata on BP callable functions that take in an FName for a "MappingName". This will make referencing Player Mappable settings in Blueprints much easier!
#rb trivial

[CL 27604089 by ben hoffman in ue5-main branch]
2023-09-05 13:51:42 -04:00
charles lefebvre
061b009699 Kismet Compiler: Deprecate SpawnIntermediateEventNode
#rnx
#rb dan.oconnor

[CL 27365052 by charles lefebvre in ue5-main branch]
2023-08-24 20:56:35 -04:00
najmm01
47aa9d0a5e PR #10630: Added new Input Modifier - Smooth Delta.
It provides a normalized smoothed difference between the current and last input value, which options on how the value is calculated for different behavior.

For boolean Input Values, it just returns the boolean as is.

#jira UE-190264
#rb me

[CL 26893500 by najmm01 in ue5-main branch]
2023-08-07 14:33:48 -04:00