C++ Unpause

Is your action binding actually getting called when the game is paused? (add a breakpoint or stick in a UE_LOG to check).

If it’s not then try binding using something like this instead (replace method names and InputComponent as needed)

FInputActionBinding menuBack = FInputActionBinding(FName("MenuBack"), IE_Released);
menuBack.bExecuteWhenPaused = true;
menuBack.ActionDelegate.BindDelegate(this, FName("MenuBackPressed"));

InputComponent->AddActionBinding(menuBack);

You could also write this as something like:

 InputComponent->BindAction("MenuBack", IE_Pressed, this, &ThisClass::MenuBackPressed).bExecuteWhenPaused = true;

(Code written from memory, may not be completely correct).

Note the bExecuteWhenPaused flag being set to true.

1 Like