Hello guys,
i am building a rebind system for input and i am having troubles, that the changes i do during gameplay are lost when closing the game.
Here is a code snippet of what i am doing inside my Controller Class (Actionmapping rebind example):
EDIT: In PostInitComp() i do the following for PlayerInput
However, this is working quite well as long as i stay in editor. Closing the game will discard all my changes and
on restart the old input bindings are loaded.
I think it has something to do with the config hierarchy but i dont want to mess around with GetDefault or even GetMutableDefault like
Rama is presenting in his Tutorial. EDIT: But i really dont want to say he is doing it wrong or something, without his Tutorials and i wouldnt be
at the point where i am that fast
I also noticed that after saving, the Input.ini only hold info about DebugExecBindings like F1-12 and so on but no Action or Axis Mappings.
Any suggestions?
best regards
Wallhalla
i am building a rebind system for input and i am having troubles, that the changes i do during gameplay are lost when closing the game.
Here is a code snippet of what i am doing inside my Controller Class (Actionmapping rebind example):
EDIT: In PostInitComp() i do the following for PlayerInput
Code:
APlayerController::InitInputSystem();
Code:
for (FInputActionKeyMapping& EachAction : PlayerInput->ActionMappings) { // compare ActionMapping Keys with the selected Actionname in UI param if (EachAction.ActionName == InputName) { // replace old Key with new Key EachAction.Key = inNewKey; // Save Changes in Saved/Config/Windows/Input.ini PlayerInput->SaveConfig(); // Flush Rebuild. false-> dont restore to default PlayerInput->ForceRebuildingKeyMaps(false); // Rebuild List for Blueprints/UMG OutAllActionMappings(ActionMappingList); return true; } }
on restart the old input bindings are loaded.
I think it has something to do with the config hierarchy but i dont want to mess around with GetDefault or even GetMutableDefault like
Rama is presenting in his Tutorial. EDIT: But i really dont want to say he is doing it wrong or something, without his Tutorials and i wouldnt be
at the point where i am that fast

I also noticed that after saving, the Input.ini only hold info about DebugExecBindings like F1-12 and so on but no Action or Axis Mappings.
Any suggestions?
best regards
Wallhalla
Comment