AActor::CallPreReplication
#include "GameFramework/Actor.h"
Access: public
Description
Called by the networking system to invoke PreReplication on this actor and all of its replicated components. Engine-internal; do not call directly from gameplay code.
Caveats & Gotchas
- • Calling this from gameplay code is unsupported and can corrupt the tracker state — the engine drives it at the correct point in the replication tick.
- • It respects the bCallPreReplication and bCallPreReplicationForReplay flags; overriding PreReplication without setting those flags means CallPreReplication will skip your override.
- • Components must have their own PreReplication overrides if they need to set conditional properties — this function iterates components automatically.
Signature
ENGINE_API void CallPreReplication(UNetDriver* NetDriver) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| NetDriver | UNetDriver* | The net driver used to find or create RepChangedPropertyTrackers for this actor and its components. | — |
Return Type
void Example
Internal engine usage (informational only) C++
// Called internally by the replication driver — not for direct use.
// The engine calls this on the server before building the replication bunch:
// Actor->CallPreReplication(NetDriver); Tags
Version History
Introduced in: 4.13
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?