Navigation
Unreal Engine C++ API Reference > Plugins > GameplayAbilities
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UGameplayEffect
References
Module | GameplayAbilities |
Header | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/GameplayEffect.h |
Include | #include "GameplayEffect.h" |
Syntax
UCLASS (Blueprintable, prioritizeCategories="Status Duration GameplayEffect GameplayCues Stacking",
Meta=(ShortTooltip="A GameplayEffect modifies attributes and tags."))
class UGameplayEffect :
public UObject ,
public IGameplayTagAssetInterface
Remarks
UGameplayEffect The GameplayEffect definition. This is the data asset defined in the editor that drives everything. This is only blueprintable to allow for templating gameplay effects. Gameplay effects should NOT contain blueprint graphs.
Variables
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() ![]() |
FGameplayTagRequirements | ApplicationTagRequirements | Tag requirements for this GameplayEffect to be applied to a target. |
![]() ![]() ![]() ![]() |
bool | bClearStackOnOverflow | If true, the entire stack of the effect will be cleared once it overflows |
![]() ![]() ![]() ![]() |
bool | bDenyOverflowApplication | If true, stacking attempts made while at the stack count will fail, resulting in the duration and context not being refreshed |
![]() ![]() ![]() ![]() |
bool | bExecutePeriodicEffectOnApplication | If true, the effect executes on application and then at every period interval. |
![]() ![]() ![]() ![]() |
bool | bRequireModifierSuccessToTriggerCues | If true, cues will only trigger when GE modifiers succeed being applied (whether through modifiers or executions) |
![]() ![]() ![]() |
bool | bSuppressStackingCues | If true, GameplayCues will only be triggered for the first instance in a stacking GameplayEffect. |
![]() |
FGameplayTagContainer | CachedAssetTags | Cached Component Data - Do not modify these at runtime! If you want to manipulate these, write your own GameplayEffectComponent set the data during PostLoad. |
![]() |
FGameplayTagContainer | CachedBlockedAbilityTags | Cached copy of all the tags this GE applies to its target to block Gameplay Abilities. |
![]() |
FGameplayTagContainer | CachedGrantedTags | Cached copy of all the tags this GE grants to its target. Data populated during PostLoad. |
![]() ![]() ![]() ![]() |
TArray< FConditionalGameplayEffect > | ConditionalGameplayEffects | Other gameplay effects that will be applied to the target of this effect if this effect applies |
![]() ![]() ![]() |
FGameplayEffectModifierMagnitude | DurationMagnitude | Duration in seconds. 0.0 for instantaneous effects; -1.0 for infinite duration. |
![]() ![]() ![]() |
EGameplayEffectDurationType | DurationPolicy | Properties |
Policy for the duration of this effect |
![]() ![]() ![]() ![]() ![]() |
FText | EditorStatusText | Allow us to show the Status of the class (valid configurations or invalid configurations) while configuring in the Editor |
![]() ![]() ![]() ![]() |
TArray< FGameplayEffectExecutionDefinition > | Executions | Array of executions that will affect the target of this effect |
![]() ![]() ![]() ![]() |
TArray< FGameplayEffectCue > | GameplayCues | Cues to trigger non-simulated reactions in response to this GameplayEffect such as sounds, particle effects, etc |
![]() ![]() ![]() ![]() ![]() |
TArray< TObjectPtr< UGameplayEffectComponent > > | GEComponents | These Gameplay Effect Components define how this Gameplay Effect behaves when applied |
![]() ![]() ![]() ![]() |
TArray< FGameplayAbilitySpecDef > | GrantedAbilities | Granted abilities |
Policy for what abilities this GE will grant. |
![]() ![]() ![]() ![]() |
FGameplayEffectQuery | GrantedApplicationImmunityQuery | Grants immunity to GameplayEffects that match this query. |
![]() ![]() ![]() ![]() |
FGameplayTagRequirements | GrantedApplicationImmunityTags | Grants the owner immunity from these source tags. |
![]() |
bool | HasGrantedApplicationImmunityQuery | Cached !GrantedApplicationImmunityQuery.IsEmpty(). Set on PostLoad. |
![]() |
bool | HasRemoveGameplayEffectsQuery | Cached !RemoveGameplayEffectsQuery.IsEmpty(). Set on PostLoad. |
![]() ![]() ![]() ![]() |
FInheritedTagContainer | InheritableBlockedAbilityTagsContainer | These blocked ability tags are applied to the actor I am applied to |
![]() ![]() ![]() ![]() |
FInheritedTagContainer | InheritableGameplayEffectTags | Tag Containers |
The GameplayEffect's Tags: tags the the GE has and DOES NOT give to the actor. |
![]() ![]() ![]() ![]() |
FInheritedTagContainer | InheritableOwnedTagsContainer | These tags are applied to the actor I am applied to |
![]() ![]() ![]() ![]() |
TArray< FGameplayModifierInfo > | Modifiers | Array of modifiers that will affect the target of this effect |
![]() ![]() ![]() ![]() |
FGameplayTagRequirements | OngoingTagRequirements | Once Applied, these tags requirements are used to determined if the GameplayEffect is "on" or "off". |
![]() ![]() ![]() ![]() |
TArray< TSubclassOf< UGameplayEffect > > | OverflowEffects | Effects to apply when a stacking effect "overflows" its stack count through another attempted application. |
![]() ![]() ![]() ![]() |
FScalableFloat | Period | Period in seconds. 0.0 for non-periodic effects |
![]() ![]() ![]() ![]() |
EGameplayEffectPeriodInhibitionRemovedPolicy | PeriodicInhibitionPolicy | How we should respond when a periodic gameplay effect is no longer inhibited |
![]() ![]() ![]() ![]() |
TArray< TSubclassOf< UGameplayEffect > > | PrematureExpirationEffectClasses | Effects to apply when this effect is made to expire prematurely (like via a forced removal, clear tags, etc.); Only works for effects with a duration |
![]() ![]() ![]() ![]() |
FGameplayTagRequirements | RemovalTagRequirements | Tag requirements that if met will remove this effect. Also prevents effect application. |
![]() ![]() ![]() ![]() |
FGameplayEffectQuery | RemoveGameplayEffectQuery | On Application of an effect, any active effects with this this query that matches against the added effect will be removed. |
![]() ![]() ![]() ![]() |
FInheritedTagContainer | RemoveGameplayEffectsWithTags | GameplayEffects that have tags in this container will be cleared upon effect application. |
![]() ![]() ![]() ![]() |
TArray< TSubclassOf< UGameplayEffect > > | RoutineExpirationEffectClasses | Effects to apply when this effect expires naturally via its duration; Only works for effects with a duration |
![]() ![]() ![]() ![]() |
EGameplayEffectStackingDurationPolicy | StackDurationRefreshPolicy | Policy for how the effect duration should be refreshed while stacking |
![]() ![]() ![]() ![]() |
EGameplayEffectStackingExpirationPolicy | StackExpirationPolicy | Policy for how to handle duration expiring on this gameplay effect |
![]() ![]() ![]() ![]() |
EGameplayEffectStackingType | StackingType | Stacking |
How this GameplayEffect stacks with other instances of this same GameplayEffect |
![]() ![]() ![]() ![]() |
int32 | StackLimitCount | Stack limit for StackingType |
![]() ![]() ![]() ![]() |
EGameplayEffectStackingPeriodPolicy | StackPeriodResetPolicy | Policy for how the effect period should be reset (or not) while stacking |
![]() ![]() ![]() ![]() ![]() ![]() |
TObjectPtr< class UGameplayEffectUIData > | UIData | Data for the UI representation of this effect. |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UGameplayEffect
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
GEComponentClass & | AddComponent () |
Add a GameplayEffectComponent to the GameplayEffect. |
![]() ![]() |
bool | CanApply
(
const FActiveGameplayEffectsContainer& ActiveGEContainer, |
Can we Apply this Gameplay Effect? Note: Apply is the generic term for adding to the active container or executing it. |
![]() ![]() |
const UGameplayEffectComponent * | FindComponent
(
TSubclassOf< UGameplayEffectComponent > ClassToFind |
|
![]() ![]() |
const GEComponentClass * | Find and return the component of class GEComponentClass on this GE, if one exists. | |
![]() |
GEComponentClass & | Find an existing GameplayEffectComponent of the requested class, or add one if none are found. | |
![]() ![]() |
const FGameplayTagContainer & | GetAssetTags () |
Returns all tags that this GE has and does not grant to any Actor. |
![]() ![]() |
const FGameplayTagContainer & | Returns all blocking ability tags granted by this gameplay effect definition. | |
![]() ![]() ![]() |
void | GetBlockedAbilityTags
(
FGameplayTagContainer& OutTagContainer |
|
![]() ![]() |
const FGameplayTagContainer & | Returns all tags granted to the Target Actor of this gameplay effect. | |
![]() ![]() ![]() |
void | GetOwnedGameplayTags
(
FGameplayTagContainer& TagContainer |
|
![]() ![]() |
EGameplayEffectStackingExpirationPolicy | Returns the stack expiration policy for this gameplay effect | |
![]() ![]() |
int32 | Returns the maximum stack size for this gameplay effect | |
![]() ![]() |
EGameplayEffectVersion | GetVersion () |
Upgrade Path |
![]() ![]() ![]() |
bool | HasAllMatchingGameplayTags
(
const FGameplayTagContainer& TagContainer |
|
![]() ![]() ![]() |
bool | HasAnyMatchingGameplayTags
(
const FGameplayTagContainer& TagContainer |
|
![]() ![]() ![]() |
bool | HasMatchingGameplayTag
(
FGameplayTag TagToCheck |
|
![]() ![]() |
bool | OnAddedToActiveContainer
(
FActiveGameplayEffectsContainer& ActiveGEContainer, |
Receive a notify that this GameplayEffect has been added to an Active Container. |
![]() ![]() |
void | OnApplied
(
FActiveGameplayEffectsContainer& ActiveGEContainer, |
Receive a notify that this GameplayEffect has been applied (this GE is either previously added to the container or executed in such cases). |
![]() ![]() |
void | OnExecuted
(
FActiveGameplayEffectsContainer& ActiveGEContainer, |
Receive a notify that this GameplayEffect has been executed (it must be instant, as it is not added to the Container). |
![]() ![]() |
void | Called when the Gameplay Effect has finished loading. | |
![]() |
void | We need to fix-up all of the SubObjects manually since the Engine doesn't fully support this | |
![]() |
void | SetVersion
(
EGameplayEffectVersion Version |
Sets the Version of the class to denote it's been upgraded |
![]() |
void | Check for any errors |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
EDataValidationResult | IsDataValid
(
FDataValidationContext& Context |
Allow each Gameplay Effect Component to validate its own data. |
![]() ![]() |
void | PostCDOCompiled
(
const FPostCDOCompiledContext& Context |
Do our upgrades in PostCDOCompiled |
![]() ![]() |
void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally |
![]() ![]() |
void | Needed to properly disable inheriting the version value from its parent. | |
![]() ![]() |
void | PostLoad () |
PostLoad gets called once after the asset has been loaded. |
![]() ![]() |
void | PreSave
(
FObjectPreSaveContext SaveContext |
We should intercept the Save call and revalidate all of our deprecated values to avoid hanging onto stale data |
Constants
Name | Description |
---|---|
INFINITE_DURATION | These are deprecated but remain for backwards compat, please use FGameplayEffectConstants:: instead. |
INSTANT_APPLICATION | |
INVALID_LEVEL | |
NO_PERIOD |
Deprecated Variables
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
TArray< TSubclassOf< UGameplayEffectCustomApplicationRequirement > > | ApplicationRequirements_DEPRECATED | |
![]() ![]() ![]() |
FScalableFloat | ChanceToApplyToTarget_DEPRECATED | Probability that this gameplay effect will be applied to the target actor (0.0 for never, 1.0 for always) |