UAbilitySystemComponent::ForceReplication
#include "AbilitySystemComponent.h"
Access: public
Specifiers: virtualoverride
Description
Forces the owning actor's replication to update immediately so that gameplay cues and ability state changes are sent to clients with minimal latency. Override to adjust how aggressively the flush occurs.
Caveats & Gotchas
- • Calling this too frequently (e.g. every frame) will degrade server performance by bypassing the normal net update frequency throttling — use it only for latency-sensitive moments like ability activation.
- • This triggers a flush on the owning actor, not just the component; if the actor has many replicated properties, the forced update can be expensive.
Signature
UE_API virtual void ForceReplication() override Return Type
void Example
Force immediate replication after applying a gameplay cue C++
// After applying a gameplay effect on the server:
AbilitySystemComponent->ApplyGameplayEffectToSelf(EffectSpec, Handle);
AbilitySystemComponent->ForceReplication(); // push cues down ASAP Version History
Introduced in: 4.15
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?