RealDocs

UGameplayStatics::IsGamePaused

function Engine Blueprint Since 4.0
#include "Kismet/GameplayStatics.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Returns whether the game is currently paused.

Caveats & Gotchas

  • Returns false if called from a context where the world is unavailable (e.g. during shutdown), so guard accordingly when using it in destructors or OnEndPlay.
  • In a networked game this reflects only the local world's pause state, which may differ from the server's if pause was initiated by a remote player.

Signature

static ENGINE_API bool IsGamePaused(const UObject* WorldContextObject);

Parameters

Name Type Description Default
WorldContextObject const UObject* Object used to retrieve the world context.

Return Type

bool

Example

Update pause menu visibility C++
void AMyHUD::DrawHUD()
{
    Super::DrawHUD();
    if (UGameplayStatics::IsGamePaused(this))
    {
        // Draw pause overlay
    }
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.