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