Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[4.11] InputActionKeyMapping saving requires game reload

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?

Product Version: UE 4.11
more ▼

asked May 30 '16 at 03:38 PM in C++ Programming

avatar image

1.2k 31 8 33

avatar image State128 Aug 03 '17 at 02:09 PM

Hi! Do u guys know how to restore the bindings from the DefaultInput.ini file (if the user wanna reset all custom bindings)?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered May 30 '16 at 08:02 PM

avatar image

1.2k 31 8 33

avatar image staticvoidlol May 31 '16 at 08:23 AM

Have you checked out Rama's wiki page on this?

Maybe "UInputSettings->ForceRebuildingKeyMaps(true)" solves the issue in a simpler way?

avatar image MajinSephiroth May 31 '16 at 12:39 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question