Does someone know why this code doesn’t actually rebind the controls?
[SerializeField] private InputActionReference jumpAction = null;
[SerializeField] private GameObject startRebindObject = null;
[SerializeField] private GameObject waitingForInputObject = null;
private InputActionRebindingExtensions.RebindingOperation rebindingOperation;
public void StartRebinding()
{
startRebindObject.SetActive(false);
waitingForInputObject.SetActive(true);
rebindingOperation = jumpAction.action.PerformInteractiveRebinding()
.WithControlsExcluding("Mouse")
.OnMatchWaitForAnother(0.1f)
.OnComplete(operation => RebindComplete())
.Start();
}
private void RebindComplete()
{
ChangeUI();
rebindingOperation.Dispose();
startRebindObject.SetActive(true);
waitingForInputObject.SetActive(false);
}
It updates the UI just fine it also saves it between sessions (thanks to other parts of the code I didn’t post because they work), but it doesn’t actually change the bind.
If I initially jump with “Space” and I change it so that I can jump with “O” it still jumps with “Space” and “O” still doesn’t do anything.