RealDocs

AGameStateBase::HasBegunPlay

function Engine Blueprint Since 4.14
#include "GameFramework/GameStateBase.h"
Access: public Specifiers: virtualUFUNCTIONBlueprintCallableconst

Description

Returns true once the world has called `BeginPlay` on all actors. Replicated via `bReplicatedHasBegunPlay` so clients can query this without requiring server authority.

Caveats & Gotchas

  • This reflects whether `BeginPlay` has fired world-wide, not whether a particular actor has begun play — use `AActor::HasActorBegunPlay()` for per-actor checks.
  • On late-joining clients the flag arrives as a replicated bool; there is a brief window after connection before it replicates, during which this returns false even though the server has begun play.

Signature

UFUNCTION(BlueprintCallable, Category=GameState)
ENGINE_API virtual bool HasBegunPlay() const

Return Type

bool

Examples

Gate gameplay initialization until BeginPlay has fired Blueprint
Event BeginPlay Cast To MyGameState Object Cast Failed As My Game State As My Game State Has Begun Play Target is Game State Base Target Return Value Branch Condition Condition True False Get Game State Return Value
Edit Blueprint graph Gate gameplay initialization until BeginPlay has fired
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Guard logic that requires BeginPlay to have fired C++
if (AGameStateBase* GS = GetWorld()->GetGameState())
{
    if (GS->HasBegunPlay())
    {
        InitializeGameplay();
    }
}

Version History

Introduced in: 4.14

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.