UAbilitySystemComponent::PreNetReceive
#include "AbilitySystemComponent.h"
Access: public
Specifiers: virtualoverride
Description
Engine replication callback invoked on clients immediately before replicated properties are applied to this component. The GAS override uses this to snapshot state before incoming changes so it can diff what changed.
Caveats & Gotchas
- • This is an engine-internal replication hook — do not override it in game code without calling Super::PreNetReceive(). Skipping the super call breaks the GAS snapshot logic that powers OnRep_ActivateAbilities and related callbacks.
- • Called only on clients (and listen-server clients) — not on the authoritative server. Logic inside should be guarded appropriately if you must touch it.
- • There is a matching PostNetReceive; the two work as a pair to bracket the replication update.
Signature
UE_API virtual void PreNetReceive() override; Return Type
void Example
Safe override pattern C++
void UMyAbilitySystemComponent::PreNetReceive()
{
// Must call super — GAS uses this to snapshot pre-replication state
Super::PreNetReceive();
// Any pre-receive logic here
} Version History
Introduced in: 4.15
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?