Navigation
API > API/Plugins > API/Plugins/GameplayAbilities > API/Plugins/GameplayAbilities/Abilities
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
| Type | Name | Description | |
|---|---|---|---|
| TSharedPtr< FAbilityReplicatedDataCache > | Find
(
const FGameplayAbilitySpecHandleAndPredictionKey& Key |
||
| TSharedRef< FAbilityReplicatedDataCache > | FindOrAdd
(
const FGameplayAbilitySpecHandleAndPredictionKey& Key |
||
| void | PrintDebug () |
||
| void | Remove
(
const FGameplayAbilitySpecHandleAndPredictionKey& Key |
Typedefs
| Name | Description |
|---|---|
| FKeyDataPair |