I use this code to override my bindings.
// Override binding
InputBinding newBinding = bindings[i];
newBinding.overridePath = FormatControlPath(pressedControl.path);
Debug.Log($"Applying override from {bindings[i].effectivePath} to {newBinding.overridePath}");
action.ApplyBindingOverride(newBinding);
And it works. But only if the binding is part of a composite. Otherwise, the overridePath for the binding doesn’t change.
Even though Debug.Log outputs the correct path for both bindings that are part of a composite and those who aren’t.
?
Full script: Pastebin