FGameplayAbilityReplicatedDataContainer

Associative container of GameplayAbilitySpecs + PredictionKeys > [FAbilityReplicatedDataCache](API\Plugins\GameplayAbilities\Abilities\FAbilityReplicatedDataCache).

Windows
MacOS
Linux

References

Module

GameplayAbilities

Header

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/GameplayAbilityTypes.h

Include

#include "Abilities/GameplayAbilityTypes.h"

Syntax

struct FGameplayAbilityReplicatedDataContainer

Remarks

Associative container of GameplayAbilitySpecs + PredictionKeys > FAbilityReplicatedDataCache. Basically, it holds replicated data on the ability system component that abilities access in their scripting. This was refactored from a normal TMap. This mainly servers to:

Return shared ptrs to the cached data so that callsites are not vulnerable to the underlying map shifting around (E.g invoking a replicated event ends the ability or activates a new one and causes memory to move, invalidating the pointer).

Data is cleared on ability end via Remove.

The FAbilityReplicatedDataCache instances are recycled rather than allocated each time via ::FreeData.

Functions

Name Description

Public function Const

TSharedPtr< ...

 

Find

(
    const FGameplayAbilitySpecHandleAnd...
)

Public function

TSharedRef< ...

 

FindOrAdd

(
    const FGameplayAbilitySpecHandleAnd...
)

Public function

void

 

PrintDebug()

Public function

void

 

Remove

(
    const FGameplayAbilitySpecHandleAnd...
)

Typedefs

Name

Description

FKeyDataPair

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss