Rebinding in New Input System

Hi,
What could be the best way to change the path for each Action in the new input system?
That’s the only way I can think of to rebind controls…

I think the provided Unity example only changes the UI of the asset?

No, the provided example change do effectively the action, but by overriding it. If you actually try pressing the rebinded input you’ll see. If you want to get programatically the real used path after the override: myInputAction.effectivePath

It took me a couple of hours and tried countless examples but couldn’t figure it out. Then I did and for me it was as simple as this.

[SerializeField] private InputActionMap player;
private InputAction action;

public void ChangeBinding()
{
    action = player["Movement"];

    if (action.bindings[0].isComposite)
        action.ChangeBindingWithPath("<Keyboard>/w").WithPath("<Keyboard>/g");
}