We’re having a lot of issues when trying to set the keybinds for a 2D vector composite input. It works perfectly fine for the other keybindings but just for movement in particular it doesn’t seem to want to set. However in the Input Debugger pictured below it says that it is set correctly, there’s the first input which is the original bindings I believe which is WASD and the second which is the changed one which is GASD. But when reading the input from the movement input behavior it still only moves with W instead of G. And yes there’s only one input setting, and yes it’s referenced correctly in the script. It works for all other inputs besides when the input binding belongs to a composite for some reason. Any ideas as why the keybindings are being set as shown in the Input Debugger but not actually properly applying like all the others?
private void PerformInteractiveRebind(InputAction action, int bindingIndex)
{
m_RebindOperation?.Cancel(); // Will null out m_RebindOperation.
void CleanUp()
{
m_RebindOperation?.Dispose();
m_RebindOperation = null;
}
//Disable Action before Use
action.Disable();
action.RemoveBindingOverride(bindingIndex);
// Configure the rebind.
m_RebindOperation = action.PerformInteractiveRebinding(bindingIndex);
// Remove any existing binding override
action.RemoveBindingOverride(bindingIndex);
HashSet<string> validPaths = m_ButtonKeySprites.ValueMap.Select(GetKeySpriteActionPath).ToHashSet();
m_RebindOperation.OnPotentialMatch(operation =>
{
string path = operation.selectedControl.path;
if(path is "/Keyboard/escape" || CheckDupilcateBindings(action, operation))
{
operation.Cancel();
return;
}
if(!validPaths.Contains(operation.selectedControl.path))
operation.Cancel();
})
.OnCancel(
operation =>
{
action.Enable();
m_RebindStopEvent?.Invoke(this, operation);
UpdateBindingDisplay();
CleanUp();
})
.OnComplete(
operation =>
{
action.Enable();
m_RebindStopEvent?.Invoke(this, operation);
UpdateBindingDisplay();
CleanUp();
if(Constructs.TryGet(out IHintManager hintManager))
hintManager.RebuildHintView();
});
// Give listeners a chance to act on the rebind starting.
m_RebindStartEvent?.Invoke(this, m_RebindOperation);
m_RebindOperation.Start();
}