Navigation
API > API/Plugins > API/Plugins/GameplayAbilities
Handle that wraps a FGameplayEffectContext or subclass, to allow it to be polymorphic and replicate properly
| Name | FGameplayEffectContextHandle |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/GameplayEffectTypes.h |
| Include Path | #include "GameplayEffectTypes.h" |
Syntax
USTRUCT (BlueprintType )
struct FGameplayEffectContextHandle
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGameplayEffectContextHandle
(
FGameplayEffectContext* DataPtr |
Constructs from an existing context, should be allocated by new | GameplayEffectTypes.h | |
| GameplayEffectTypes.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FGameplayEffectContextHandle() |
GameplayEffectTypes.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Data | TSharedPtr< FGameplayEffectContext > | GameplayEffectTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddActors
(
const TArray< TWeakObjectPtr< AActor > >& InActors, |
Add actors to the stored actor list | GameplayEffectTypes.h | |
void AddHitResult
(
const FHitResult& InHitResult, |
Add a hit result for targeting | GameplayEffectTypes.h | |
void AddInstigator
(
AActor* InInstigator, |
Sets the instigator and effect causer. | GameplayEffectTypes.h | |
void AddOrigin
(
FVector InOrigin |
Adds an origin point | GameplayEffectTypes.h | |
void AddSourceObject
(
const UObject* NewSourceObject |
Sets the object this effect was created from. | GameplayEffectTypes.h | |
void Clear() |
GameplayEffectTypes.h | ||
FGameplayEffectContextHandle Duplicate() |
Creates a deep copy of this handle, used before modifying | GameplayEffectTypes.h | |
| Returns Raw effet context, may be null | GameplayEffectTypes.h | ||
const FGameplayEffectContext * Get () |
GameplayEffectTypes.h | ||
const UGameplayAbility * GetAbility() |
Returns the Ability CDO | GameplayEffectTypes.h | |
const UGameplayAbility * GetAbilityInstance_NotReplicated() |
Returns the Ability Instance (never replicated) | GameplayEffectTypes.h | |
int32 GetAbilityLevel() |
Returns level this was executed at | GameplayEffectTypes.h | |
const TArray< TWeakObjectPtr< AActor > > GetActors() |
Returns actor list, may be empty | GameplayEffectTypes.h | |
virtual AActor * GetEffectCauser() |
Returns the physical actor tied to the application of this effect | GameplayEffectTypes.h | |
const FHitResult * GetHitResult() |
Returns hit result, this can be null | GameplayEffectTypes.h | |
virtual AActor * GetInstigator() |
Returns the immediate instigator that applied this effect | GameplayEffectTypes.h | |
virtual UAbilitySystemComponent * GetInstigatorAbilitySystemComponent() |
Returns the ability system component of the instigator of this effect | GameplayEffectTypes.h | |
virtual const FVector & GetOrigin() |
Returns origin point, may be invalid if HasOrigin is false | GameplayEffectTypes.h | |
| Should always return the original instigator that started the whole chain. | GameplayEffectTypes.h | ||
UAbilitySystemComponent * GetOriginalInstigatorAbilitySystemComponent() |
Returns the ability system component of the instigator that started the whole chain | GameplayEffectTypes.h | |
void GetOwnedGameplayTags
(
FGameplayTagContainer& ActorTagContainer, |
Returns the list of gameplay tags applicable to this effect, defaults to the owner's tags | GameplayEffectTypes.h | |
UObject * GetSourceObject() |
Returns the object this effect was created from. | GameplayEffectTypes.h | |
virtual bool HasOrigin() |
Returns true if GetOrigin will give valid information | GameplayEffectTypes.h | |
bool IsLocallyControlled() |
Returns if the instigator is locally controlled | GameplayEffectTypes.h | |
bool IsLocallyControlledPlayer() |
Returns if the instigator is locally controlled and a player | GameplayEffectTypes.h | |
bool IsValid() |
GameplayEffectTypes.h | ||
bool NetSerialize
(
FArchive& Ar, |
Custom serializer, handles polymorphism of context | GameplayEffectTypes.h | |
void SetAbility
(
const UGameplayAbility* InGameplayAbility |
Sets Ability instance and CDO parameters on context | GameplayEffectTypes.h | |
FString ToString() |
Returns debug string | GameplayEffectTypes.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
FGameplayEffectContextHandle const& Other |
Comparison operator | GameplayEffectTypes.h | |
void operator=
(
FGameplayEffectContext* DataPtr |
Sets from an existing context, should be allocated by new | GameplayEffectTypes.h | |
bool operator==
(
FGameplayEffectContextHandle const& Other |
Comparison operator | GameplayEffectTypes.h |