I've been working on interactive rebinding in the input system of unity. But for some reason the old keybinds remain active. the default is wasd but if I rebind it in the menu to arrows arrows and wasd both move it. If I rebind after rebinding it to arrows to another one it uses wasd and the newly rebinded keys so it's not like it ain't removing it. It's more like it keeps the default active.
private void startRebinding(Button button, InputActionReference action, TMP_Text display, int bindingIndex = -1)
{
button.interactable = false;
display.text = waitingForInputText;
action.action.Disable();
playerInput.SwitchCurrentActionMap("UI");
action.action.PerformInteractiveRebinding(bindingIndex)
.OnMatchWaitForAnother(0.1f)
.OnComplete(operation =>
{
display.text = InputControlPath.ToHumanReadableString(
action.action.bindings[bindingIndex].effectivePath,
InputControlPath.HumanReadableStringOptions.OmitDevice);
operation.Dispose();
button.interactable = true;
playerInput.SwitchCurrentActionMap("Player");
action.action.Enable();
})
.Start();
}
how can I make it so that it stops using the default keybind if you set a new keybind.