UAbilitySystemComponent::AbilityReplicatedEventDelegate
#include "AbilitySystemComponent.h"
Access: public
Description
Returns the multicast delegate for a specific Generic Replicated Event and ability/prediction-key pair. Bind to this when you need to react to the event arriving but cannot use the race-safe CallOrAddReplicatedDelegate.
Caveats & Gotchas
- • Prefer CallOrAddReplicatedDelegate over manually binding here; raw binding can miss events that already arrived before the bind.
- • One delegate slot exists per EventType per ability/prediction-key pair — if multiple tasks bind to the same slot, all will fire, but they must all unregister correctly or the delegate leaks.
Signature
UE_API FSimpleMulticastDelegate& AbilityReplicatedEventDelegate(EAbilityGenericReplicatedEvent::Type EventType, FGameplayAbilitySpecHandle AbilityHandle, FPredictionKey AbilityOriginalPredictionKey) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| EventType | EAbilityGenericReplicatedEvent::Type | The generic replicated event type whose delegate you want. | — |
| AbilityHandle | FGameplayAbilitySpecHandle | Handle identifying the ability. | — |
| AbilityOriginalPredictionKey | FPredictionKey | Prediction key from when the ability was activated. | — |
Return Type
FSimpleMulticastDelegate& Example
Manually bind to an InputConfirm replicated event C++
ASC->AbilityReplicatedEventDelegate(
EAbilityGenericReplicatedEvent::InputConfirm,
AbilityHandle, OriginalPredKey)
.AddUObject(this, &UMyTask::HandleInputConfirm); See Also
Version History
Introduced in: 4.15
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?