Navigation
API > API/Plugins > API/Plugins/GameplayAbilities > API/Plugins/GameplayAbilities/Abilities
References
| Module | GameplayAbilities |
| Header | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/GameplayAbilityTargetTypes.h |
| Include | #include "Abilities/GameplayAbilityTargetTypes.h" |
Syntax
USTRUCT (BlueprintType )
struct FGameplayAbilityTargetDataHandle
Remarks
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
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< TSharedPtr< FGameplayAbilityTargetData >, TInlineAllocator< 1 > > | Data | Raw storage of target data, do not modify this directly | |
| uint8 | UniqueId |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FGameplayAbilityTargetDataHandle
(
const FGameplayAbilityTargetDataHandle& Other |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Add
(
FGameplayAbilityTargetData* DataPtr |
Adds a new target data to handle, it must have been created with new | |
| void | Append
(
const FGameplayAbilityTargetDataHandle& OtherHandle |
Does a shallow copy of target data from one handle to another | |
| void | Clear () |
Resets handle to have no targets | |
| const FGameplayAbilityTargetData * | Returns data at index, or nullptr if invalid | ||
| FGameplayAbilityTargetData * | Returns data at index, or nullptr if invalid | ||
| bool | Returns true if there are any valid targets | ||
| bool | NetSerialize
(
FArchive& Ar, |
Serialize for networking, handles polymorphism | |
| int32 | Num () |
Returns number of target data, not number of actors/targets as target data may contain multiple actors |
Operators
| Type | Name | Description | |
|---|---|---|---|
| bool | operator!=
(
const FGameplayAbilityTargetDataHandle& Other |
Comparison operator | |
| FGameplayAbilityTargetDataHandle & | operator=
(
FGameplayAbilityTargetDataHandle&& Other |
||
| FGameplayAbilityTargetDataHandle & | operator=
(
const FGameplayAbilityTargetDataHandle& Other |
||
| bool | operator==
(
const FGameplayAbilityTargetDataHandle& Other |
Comparison operator |