I’m using the new input system and I have an option menu to change the binding of the inputs but I don’t know how to save them so I can load them between sessions.
I have this Input Action file named GamePlay
So I think I just have to save the path and then use
InputAction.ApplyBindingOverride
as I do when remaping* but the problem is that I don’t know where to get the path of the InputAction.
Is there something like
MyInputActionClass.ActionMap.InputAction.path
Of course if there is better way to save I would be happy to know them
-
Here is my remaping function :
void RemapButtonClicked(InputAction actionToRebind) { var rebindOperation = actionToRebind.PerformInteractiveRebinding() .OnMatchWaitForAnother(0.1f) .WithCancelingThrough("") .Start(); rebindOperation.OnApplyBinding((op, path) => { actionToRebind.ApplyBindingOverride(path); rebindOperation.Dispose(); }); }