Navigation
API > API/Plugins > API/Plugins/GameplayAbilities
Handle for Targeting Data. This servers two main purposes: -Avoid us having to copy around the full targeting data structure in Blueprints -Allows us to leverage polymorphism in the target data structure -Allows us to implement NetSerialize and replicate by value between clients/server
-Avoid using UObjects could be used to give us polymorphism and by reference passing in blueprints. -However we would still be screwed when it came to replication
-Replication by value -Pass by reference in blueprints -Polymophism in TargetData structure
| Name | FGameplayAbilityTargetDataHandle |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/GameplayAbilityTargetTypes.h |
| Include Path | #include "Abilities/GameplayAbilityTargetTypes.h" |
Syntax
USTRUCT (BlueprintType )
struct FGameplayAbilityTargetDataHandle
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Abilities/GameplayAbilityTargetTypes.h | |||
| Abilities/GameplayAbilityTargetTypes.h | |||
| Abilities/GameplayAbilityTargetTypes.h | |||
FGameplayAbilityTargetDataHandle
(
const FGameplayAbilityTargetDataHandle& Other |
Abilities/GameplayAbilityTargetTypes.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Data | TArray< TSharedPtr< FGameplayAbilityTargetData >, TInlineAllocator< 1 > > | Raw storage of target data, do not modify this directly | Abilities/GameplayAbilityTargetTypes.h | |
| UniqueId | uint8 | Abilities/GameplayAbilityTargetTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Add
(
FGameplayAbilityTargetData* DataPtr |
Adds a new target data to handle, it must have been created with new | Abilities/GameplayAbilityTargetTypes.h | |
void Append
(
const FGameplayAbilityTargetDataHandle& OtherHandle |
Does a shallow copy of target data from one handle to another | Abilities/GameplayAbilityTargetTypes.h | |
void Clear() |
Resets handle to have no targets | Abilities/GameplayAbilityTargetTypes.h | |
const FGameplayAbilityTargetData * Get
(
int32 Index |
Returns data at index, or nullptr if invalid | Abilities/GameplayAbilityTargetTypes.h | |
FGameplayAbilityTargetData * Get
(
int32 Index |
Returns data at index, or nullptr if invalid | Abilities/GameplayAbilityTargetTypes.h | |
bool IsValid
(
int32 Index |
Returns true if there are any valid targets | Abilities/GameplayAbilityTargetTypes.h | |
bool NetSerialize
(
FArchive& Ar, |
Serialize for networking, handles polymorphism | Abilities/GameplayAbilityTargetTypes.h | |
int32 Num() |
Returns number of target data, not number of actors/targets as target data may contain multiple actors | Abilities/GameplayAbilityTargetTypes.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FGameplayAbilityTargetDataHandle& Other |
Comparison operator | Abilities/GameplayAbilityTargetTypes.h | |
| Abilities/GameplayAbilityTargetTypes.h | |||
FGameplayAbilityTargetDataHandle & operator=
(
const FGameplayAbilityTargetDataHandle& Other |
Abilities/GameplayAbilityTargetTypes.h | ||
bool operator==
(
const FGameplayAbilityTargetDataHandle& Other |
Comparison operator | Abilities/GameplayAbilityTargetTypes.h |