FGameplayAbilityTargetDataHandle

Handle for Targeting Data.

Windows
MacOS
Linux

References

Module

GameplayAbilities

Header

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

Include

#include "Abilities/GameplayAbilityTargetTypes.h"

Syntax

[USTRUCT](Programming/UnrealArchitecture/Reference/Structs)([BlueprintType](Programming/UnrealArchitecture/Reference/Structs/Specifiers/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

Name Description

Public variable

TArray< TShared...

 

Data

Raw storage of target data, do not modify this directly

Public variable

uint8

 

UniqueId

Constructors

Functions

Name Description

Public function

void

 

Add

(
    FGameplayAbilityTargetData* Da...
)

Adds a new target data to handle, it must have been created with new

Public function

void

 

Append

(
    const FGameplayAbilityTargetDataHan...
)

Does a shallow copy of target data from one handle to another

Public function

void

 

Clear()

Resets handle to have no targets

Public function Const

const FGamep...

 

Get

(
    int32 Index
)

Returns data at index, or nullptr if invalid

Public function

FGameplayAbi...

 

Get

(
    int32 Index
)

Returns data at index, or nullptr if invalid

Public function Const

bool

 

IsValid

(
    int32 Index
)

Returns true if there are any valid targets

Public function

bool

 

NetSerialize

(
    FArchive& Ar,
    UPackageMap* Map,
    bool& bOutSuccess
)

Serialize for networking, handles polymorphism

Public function Const

int32

 

Num()

Returns number of target data, not number of actors/targets as target data may contain multiple actors

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const FGameplayAbilityTargetDataHan...
)

Comparison operator

Public function

FGameplayAbi...

 

operator=

Public function

FGameplayAbi...

 

operator=

(
    const FGameplayAbilityTargetDataHan...
)

Public function Const

bool

 

operator==

(
    const FGameplayAbilityTargetDataHan...
)

Comparison operator

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