I have several input key mappings defined inside of the project settings. These Action Mappings are used in a blueprint player controller.
I’ve created the way to get all mappings and save them through c++ and implemented them through UMG.
As soon as I call const_cast(InputSettings)->SaveKeyMappings();
it invalidates all bindings until you close the game down and restart it. Then all of your updated binds work again.
Any idea why this would be happening?
So, I was able to fix this issue by re-working the way I check for input. My previous method implemented the widget’s OnKeyUp and OnKeyDown overriden events in order to pass input.
I modified the widget to listen to key inputs from the PlayerController instead and everything seems to work fine now, no longer requires a game reload in order for the bindings to work.
I’m guessing the problem with OnKeyUp and OnKeyDown in a widget is the “Get Key” node from the “In Key Event”. Since that’s the only difference between the two methods I listed.
Hopefully this helps anyone else that runs into this problem.
Have you checked out Rama’s wiki page on this?
Maybe “UInputSettings->ForceRebuildingKeyMaps(true)” solves the issue in a simpler way?
I’ve done that as well, UInputSettings->ForceRebuildingKeyMaps(true)
only writes to the custom user settings ini file. It still made the game need to reload in order for keybinds to work again.
Hi!
Do u guys know how to restore the bindings from the DefaultInput.ini file (if the user wanna reset all custom bindings)?