RealDocs

AActor::SetCallPreReplicationForReplay

function Engine Since 4.20
#include "GameFramework/Actor.h"
Access: public

Description

Controls whether `PreReplicationForReplay()` is called before each replay replication pass. Use to opt out of per-frame replay replication overhead for actors whose state does not change.

Caveats & Gotchas

  • This only affects replay recording, not live gameplay replication. `SetCallPreReplication` and `SetCallPreReplicationForReplay` are independent flags.
  • Disabling this while using demo recording may cause divergence between what the replay records and actual gameplay state if the actor does mutate replicated properties during play.

Signature

ENGINE_API void SetCallPreReplicationForReplay(bool bCall);

Parameters

Name Type Description Default
bCall bool Whether PreReplicationForReplay should be called on this actor before each potential replay replication.

Return Type

void

Example

Disable replay PreReplication for a decoration actor C++
void ADecorationActor::BeginPlay()
{
	Super::BeginPlay();
	SetCallPreReplication(false);
	SetCallPreReplicationForReplay(false);
}

Version History

Introduced in: 4.20

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.