AGameStateBase::HasBegunPlay
#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
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?