Custom Action Mappings Don't Work in Packaged Game

Let me try to explain this issue, so here’s a part of my script that DOES work:

As you can see, when a new key is selected from umg input key selector, I first remove the active binding, add the new one, then save it all to the Input Project Settings. The stuff after that is for my save file so that the right key displays on the UI, but I’m 99% sure thats not where the issue comes from. Also note that the Axis Mapping “MoveForward” is a default axis mapping.

Now this line of script DOESN’T work. It is the exact same as the script above, except it’s a different input key selector, and a different axis mapping, “MoveBackward” which isn’t a default axis mapping.

Now here’s where it gets weird. When I play in the editor, the script on the bottom does exactly what it should, changes the keybinding to Move Backward, no problems at all. When I package my game for Windows 64, however, the “MoveForward” key remapping still works, but the “MoveBackward” one doesn’t. This issue applies to all my custom keymappings, both axis mappings and action mappings. The only difference I can think of between the two is that MoveForward is keymapping that already exists when the project is first launched, while MoveBackward I made manually.

One other thing to mention is that the default value given to my custom mappings does work in the packaged game, but they won’t change.

So is there a solution to this? Do I Have to completely rework my mappings and stuff? If you know please share, and thank you.

Alright after some messing around I fixed it. Instead of getting a copy of the Axis Mapping By Name node, I plugged it through a For Each Loop node. Then, I added a function to reset all progression in the built game, essentially deleting and remaking the save file. This combination solved my problem, all the keybindings work exactly as they should now!

I’m in the same problem. It doesn’t work on standalone but on viewport, yes.

In standalone the “Remove Action Mapping” and “Add Action Mapping” don’t work.

Please, can you explain how did you make the file?

So from what I can gather, the script you posted looks fine, should work no problem. Plus if it works in the view port, then the script can’t be the problem. I got mine to work by adding a function to delete and re-create the save file that is associated with the standalone game. I found that after I had reset everything, the bindings worked fine. This fix was literally “turn it off then back on again,” but it worked. So if you have a save system set up already, try recreating a save slot and seeing if that works.

256548-capture.png

Also note that after I delete that save file, another one is automatically created after the level restarts

256550-asdasda.png

My problem is the “Save input Mapping” and “Add action mapping” nodes don’t save to “DefaultInput.ini” in Standalone mode but reads them. In viewport mode saves correctly and I don’t know why.

I see that you use “save game” node to save the bindings no?.

This is the weird thing. I have all the bindings saving into the Default Input Settings, not my save game. I think what it comes down to is after you package your game, some stuff gets left over from the last build in the DefaultInput.ini. If you can create a new, fresh DefaultInput.ini, then all the keybindings should work as intended. Now this is just me guessing, but when I delete my save game, for some reason it also deletes the DefaultInput.ini, then recreates it once the level restarts. Id try it, in theory it sounds like the save game and DefaultInput.ini aren’t connected, but its how I got it to work so its worth a shot.