With 5.3, a lot of functions in EnhancedInputSubsystemInterface have been deprecated. For example: RemoveAllPlayerMappedKeys, which I’m relying on in my code.
The build log instructs me to use UEnhancedInputUserSettings instead, but I can’t find a comparable function in that particular class.
I don’t know if there are replacement functions I can use, or if the whole system has fundamentally changed. The release notes don’t seem to mention any of this, unless I missed something?
That helps a bit, but this is where I’m at: I’m using the new MapPlayerKey() function to map an action.
First it gets the profile UEnhancedPlayerMappableKeyProfile* KeyProfile
It succeeds at this.
Then it goes: if (FPlayerKeyMapping* FoundMapping = KeyProfile->FindKeyMapping(InArgs))
It fails to find a mapping. I don’t know how to add one to the profile. The Input Action exists in my Input Mapping Context, but obviously I need to do more.
Then it tries:
else if (FKeyMappingRow* MappingRow = KeyProfile->FindKeyMappingRowMutable(InArgs.MappingName))
That fails too.
This it just logs this error: UE_LOG(LogEnhancedInput, Warning, TEXT("[UEnhancedInputUserSettings::MapPlayerKey] Failed to map a player key for '%s'"), *InArgs.MappingName.ToString());
One step closer. I called RegisterInputMappingContext() on BeingPlay. Now my keys actually bind properly. Only issue I have now is that mapping a key in one slot, maps it in all slots. For example, I have two mappings for each action, a primary and secondary. Mainly for both keyboard and gamepad support, but it’s not restricted to that. Changing the primary to a particular key also changed the secondary to that same key.
I figured it all out now, so marking this as solved. Mostly logic errors in my ui code, in addition to the things already mentioned, such as using RegisterInputMappingContext.