Download

Method SaveKeyMappings on UInputSettings can not save any configs

I want to remapping short-cut in my game.

I use the following code:


const FName name = FName("MKey");

const FInputActionKeyMapping fInputActionKeyMapping(name, EKeys::M);

const UInputSettings* DefaultInputSettings = GetDefault<UInputSettings>();
((UInputSettings*)DefaultInputSettings)->RemoveActionMapping(fInputActionKeyMapping);

	
((UInputSettings*)DefaultInputSettings)->SaveKeyMappings();

But Nothing be saved. is there a engine’s bug?