The question is basically — Can I use InputComponent->BindAction() at any time during the game to add a function that I want to be executed for specific Input Action.
I am asking because it seems like by default the binding process is carried out in SetupPlayerInputComponent() which is called by the PawnClientRestart() method in APawn. And there is a whole bunch of things going on there:
if (InputComponent)
{
SetupPlayerInputComponent(InputComponent);
InputComponent->RegisterComponent();
if (UInputDelegateBinding::SupportsInputDelegate(GetClass()))
{
InputComponent->bBlockInput = bBlockInput;
UInputDelegateBinding::BindInputDelegates(GetClass(),
InputComponent);
}
}
Is using BindAction() or RemoveActionMapping() sufficient for changing what function should be called on specific Input Action, or should I call some other stuff after.