RealDocs

ACharacter::PostNetReceive

function Engine Since 4.0
#include "GameFramework/Character.h"
Access: public Specifiers: virtualoverride

Description

Called on the client after all replicated properties have been applied for this network update. ACharacter uses this to react to changes in gravity direction that arrived via replication.

Caveats & Gotchas

  • Only fires on clients — the server never calls this. Logic placed here will silently not run in standalone or listen-server authority contexts.
  • If you diff a value against your Pre snapshot, always guard against the case where PreNetReceive was not called (e.g., the first replication frame) by initialising your cached value appropriately.

Signature

ENGINE_API virtual void PostNetReceive() override;

Return Type

void

Example

React to a replicated value change after replication C++
void AMyCharacter::PostNetReceive()
{
    Super::PostNetReceive();
    if (OldReplicatedState != CurrentReplicatedState)
    {
        OnReplicatedStateChanged();
    }
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.