In exemple Controlling Cross-Platform Characters with Unity Input System have menu rebindings. But this rebind system is good how my English.
Does it make to fix and refine it or is it better to use example Rebinding UI in plygin Input System?
In exemple Controlling Cross-Platform Characters with Unity Input System have menu rebindings. But this rebind system is good how my English.
Does it make to fix and refine it or is it better to use example Rebinding UI in plygin Input System?
Specifically this code.
void StartRebindProcess()
{
ToggleGameObjectState(rebindButtonObject, false);
ToggleGameObjectState(resetButtonObject, false);
ToggleGameObjectState(listeningForInputObject, true);
rebindOperation = focusedInputAction.PerformInteractiveRebinding()
.WithControlsExcluding("<Mouse>/position")
.WithControlsExcluding("<Mouse>/delta")
.WithControlsExcluding("<Gamepad>/Start")
.WithControlsExcluding("<Keyboard>/p")
.WithControlsExcluding("<Keyboard>/escape")
.OnMatchWaitForAnother(0.1f)
.OnComplete(operation => RebindCompleted());
rebindOperation.Start();
}
void RebindCompleted()
{
rebindOperation.Dispose();
rebindOperation = null;
ToggleGameObjectState(rebindButtonObject, true);
ToggleGameObjectState(resetButtonObject, true);
ToggleGameObjectState(listeningForInputObject, false);
UpdateActionDisplayUI();
UpdateBindingDisplayUI();
}
I found topics about problems with this code and they are not solvable. Is it really possible to add a composite check and busy binds check, or is it better to remake, for example Rebinding UI.