RealDocs

UAbilitySystemComponent::ConsumeClientReplicatedTargetData

function GameplayAbilities Since 4.15
#include "AbilitySystemComponent.h"
Access: public

Description

Clears only the cached client target data for the given ability handle and prediction key, leaving generic replicated event data intact.

Caveats & Gotchas

  • Use this instead of ConsumeAllReplicatedData when an ability still needs to process generic replicated events after consuming its target data.
  • Only clears already-received and stored data on the server; does not cancel any in-flight RPCs.

Signature

void ConsumeClientReplicatedTargetData(FGameplayAbilitySpecHandle AbilityHandle, FPredictionKey AbilityOriginalPredictionKey)

Parameters

Name Type Description Default
AbilityHandle FGameplayAbilitySpecHandle Handle to the ability spec whose cached target data should be cleared.
AbilityOriginalPredictionKey FPredictionKey The prediction key identifying which activation's target data to clear.

Return Type

void

Example

Selective consume inside a multi-step ability C++
// After applying the targeting effect, but before the ability's confirm phase:
ASC->ConsumeClientReplicatedTargetData(AbilityHandle, OriginalPredictionKey);
// Generic events (e.g. InputConfirm) are still available for later processing.

Version History

Introduced in: 4.15

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.