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

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback