UAbilitySystemComponent::ReplicatedPredictionKeyMap
#include "AbilitySystemComponent.h"
Access: public
Specifiers: UPROPERTYReplicatedTransient
Description
Replicated map that synchronises prediction keys from the autonomous proxy to the server so both sides can correlate client-predicted actions with their authoritative results.
Caveats & Gotchas
- • This property must come last in the replicated property list on the component; the comment in the header explicitly warns that OnRep and callback ordering depends on it being last.
- • Do not read or write this directly in game code — use the prediction key API (FPredictionKey, ScopedPredictionWindow) instead; direct manipulation can corrupt the prediction system's sequencing.
Signature
UPROPERTY(Replicated, Transient)
FReplicatedPredictionKeyMap ReplicatedPredictionKeyMap Example
Inspecting prediction key state for debugging C++
// Debug-only: iterate replicated keys to diagnose prediction mismatches
for (auto& KeyPair : ASC->ReplicatedPredictionKeyMap.Map)
{
UE_LOG(LogAbilitySystem, Verbose,
TEXT("PredKey %d: base=%d"),
KeyPair.Key.Current, KeyPair.Key.Base);
} Version History
Introduced in: 4.15
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?