I don’t know if Im doing this good, but I managed to make the game pause, but now I can’t find the way to Unpause it.
So the code works whenever the user presses the key ‘P’
void ACharacter::Pause()
{
if (bPaused)
{
bPaused = false;
UGameplayStatics::SetGamePaused(GetWorld(), false);
}
else
{
bPaused = true;
UGameplayStatics::SetGamePaused(GetWorld(), true);
}
}