Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/GameplayEffectTypes.h |
Include |
#include "GameplayEffectTypes.h" |
USTRUCT()
struct FGameplayEffectContext
Data structure that stores an instigator and related data, such as positions and targets Games can subclass this structure and add game-specific information It is passed throughout effect execution so it is a great place to track transient information about an execution
Name | Description | ||
---|---|---|---|
|
TWeakObjectPtr<... |
AbilityCDO |
The ability CDO that is responsible for this effect context (replicated) |
|
TWeakObjectPtr<... |
AbilityInstanceNotReplicated |
The ability instance that is responsible for this effect context (NOT replicated) |
|
AbilityLevel |
The level this was executed at |
|
|
Actors |
Actors referenced by this context |
|
|
uint8: 1 |
bHasWorldOrigin |
|
|
uint8: 1 |
bReplicateSourceObject |
True if the SourceObject can be replicated. This bool is not replicated itself. |
|
TWeakObjectPtr<... |
EffectCauser |
The physical actor that actually did the damage, can be a weapon or projectile |
|
TSharedPtr< FHi... |
HitResult |
Trace information - may be nullptr in many cases |
|
TWeakObjectPtr<... |
Instigator |
Instigator actor, the actor that owns the ability system component |
|
TWeakObjectPtr<... |
InstigatorAbilitySystemComponent |
The ability system component that's bound to instigator |
|
TWeakObjectPtr<... |
SourceObject |
Object this effect was created from, can be an actor or static object. |
|
WorldOrigin |
Stored origin, may be invalid if bHasWorldOrigin is false |
Name | Description | |
---|---|---|
|
FGameplayEffectContext() |
|
|
FGameplayEffectContext |
Name | Description | |
---|---|---|
|
~FGameplayEffectContext() |
Name | Description | ||
---|---|---|---|
|
AddActors ( |
Add actors to the stored actor list |
|
|
AddHitResult ( |
Add a hit result for targeting |
|
|
AddInstigator |
Sets the instigator and effect causer. |
|
|
AddOrigin ( |
Adds an origin point |
|
|
AddSourceObject ( |
Sets the object this effect was created from. |
|
|
FGameplayEff... |
Duplicate() |
Creates a copy of this context, used to duplicate for later modifications |
|
const UGamep... |
GetAbility() |
Returns the CDO of the ability used to instigate this context |
|
const UGamep... |
GetAbilityInstance_NotReplicated() |
Returns the specific instance that instigated this, may not always be set |
|
GetAbilityLevel() |
Gets the ability level this was evaluated at |
|
|
const TArray... |
GetActors() |
Returns actor list, may be empty |
|
AActor * |
GetEffectCauser() |
Returns the physical actor tied to the application of this effect |
|
const FHitRe... |
GetHitResult() |
Returns hit result, this can be null |
|
FHitResult &... |
GetHitResult() |
Returns hit result, this can be null |
|
AActor * |
GetInstigator() |
Returns the immediate instigator that applied this effect |
|
UAbilitySyst... |
GetInstigatorAbilitySystemComponent() |
Returns the ability system component of the instigator of this effect |
|
const FVecto... |
GetOrigin() |
Returns origin point, may be invalid if HasOrigin is false |
|
AActor * |
GetOriginalInstigator() |
Should always return the original instigator that started the whole chain. |
|
UAbilitySyst... |
GetOriginalInstigatorAbilitySystemComponent() |
Returns the ability system component of the instigator that started the whole chain |
|
GetOwnedGameplayTags ( |
Returns the list of gameplay tags applicable to this effect, defaults to the owner's tags |
|
|
UScriptStruc... |
GetScriptStruct() |
Returns the actual struct used for serialization, subclasses must override this! |
|
UObject *... |
GetSourceObject() |
Returns the object this effect was created from. |
|
HasOrigin() |
Returns true if GetOrigin will give valid information |
|
|
IsLocallyControlled() |
True if this was instigated by a locally controlled actor |
|
|
IsLocallyControlledPlayer() |
True if this was instigated by a locally controlled player |
|
|
NetSerialize ( |
Custom serialization, subclasses must override this |
|
|
SetAbility ( |
Sets the ability that was used to spawn this |
|
|
SetEffectCauser ( |
Modify the effect causer actor, useful when that information is added after creation |
|
|
ToString() |
Returns debug string |