AGameModeBase::IsHandlingReplays
#include "GameFramework/GameModeBase.h"
Access: public
Specifiers: virtual
Description
Returns true if the game mode automatically starts and stops replay recording when gameplay begins and ends. The base implementation returns false; AGameMode overrides it to return true when replay recording is configured.
Caveats & Gotchas
- • Returning true from this function tells the engine to call StartRecordingReplay and StopRecordingReplay around match play. If you handle replay recording manually, return false to prevent double-recording.
- • This is checked during StartPlay and HasMatchEnded on AGameMode (not AGameModeBase). If you subclass AGameModeBase directly rather than AGameMode, replay auto-management will never trigger regardless of what you return here.
- • Replay recording requires a network replay driver to be configured (e.g., LocalFileNetworkReplayStreamer). Returning true without a configured driver will silently fail rather than error.
Signature
ENGINE_API virtual bool IsHandlingReplays(); Return Type
bool Example
Enable automatic replay recording C++
// Override in your AGameMode subclass (not AGameModeBase)
bool AMyGameMode::IsHandlingReplays()
{
// Record replays in non-editor builds only
return !GIsEditor;
} Tags
Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?