Navigation
API > API/Plugins > API/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&40;Blueprintable, prioritizeCategories&61;"Status Duration GameplayEffect GameplayCues Stacking",
Meta&61;&40;ShortTooltip&61;"A GameplayEffect modifies attributes and tags."&41;&41;
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 | |
|---|---|---|---|
| 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. | |
| 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< FGameplayModifierInfo > | Modifiers | Array of modifiers that will affect the target of this effect | |
| 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 | |
| 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 |
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. | ||
| 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 | OnAddedToActiveContainer
(
FActiveGameplayEffectsContainer& ActiveGEContainer, |
Receive a notify that this GameplayEffect has been added to an Active Container. | |
| 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 |
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. |
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 | Application Requirements is deprecated. Use the UCustomCanApplyGameplayEffectComponent instead. | |
| FGameplayTagRequirements | ApplicationTagRequirements | Application Tag Requirements is deprecated. Use the UTargetTagRequirementsGameplayEffectComponent instead. | |
| FScalableFloat | ChanceToApplyToTarget_DEPRECATED | Chance To Apply To Target is deprecated. Use the UChanceToApplyGameplayEffectComponent instead. | |
| TArray< FConditionalGameplayEffect > | ConditionalGameplayEffects | Conditional Gameplay Effects is deprecated. Use the UAdditionalEffectsGameplayEffectComponent instead. | |
| TArray< FGameplayAbilitySpecDef > | GrantedAbilities | GrantedAbilities are deprecated in favor of AbilitiesGameplayEffectComponent | |
| FGameplayEffectQuery | GrantedApplicationImmunityQuery | Granted Application Immunity Query is deprecated. Use the UImmunityGameplayEffectComponent instead. | |
| FGameplayTagRequirements | GrantedApplicationImmunityTags | Granted Application Immunity Tags is deprecated. Use the UImmunityGameplayEffectComponent instead. | |
| bool | HasGrantedApplicationImmunityQuery | HasGrantedApplicationImmunityQuery is deprecated. Use the UImmunityGameplayEffectComponent instead. | |
| bool | HasRemoveGameplayEffectsQuery | HasRemoveGameplayEffectsQuery is deprecated. Use the URemoveOtherGameplayEffectComponent instead. | |
| FInheritedTagContainer | InheritableBlockedAbilityTagsContainer | Inheritable Blocked Ability Tags Container is deprecated. Use the UTargetTagsGameplayEffectComponent instead. To access, use GetBlockedAbilityTags. | |
| FInheritedTagContainer | InheritableGameplayEffectTags | Inheritable Gameplay Effect Tags is deprecated. To configure, add a UAssetTagsGameplayEffectComponent. To access, use GetAssetTags. | |
| FInheritedTagContainer | InheritableOwnedTagsContainer | Inheritable Owned Tags Container is deprecated. To configure, add a UTargetTagsGameplayEffectComponent. To access, use GetGrantedTags. | |
| FGameplayTagRequirements | OngoingTagRequirements | Ongoing Tag Requirements is deprecated. Use the UTargetTagRequirementsGameplayEffectComponent instead. | |
| TArray< TSubclassOf< UGameplayEffect > > | PrematureExpirationEffectClasses | Premature Expiration Effect Classes is deprecated. Use the UAdditionalEffectsGameplayEffectComponent instead. | |
| FGameplayTagRequirements | RemovalTagRequirements | Removal Tag Requirements is deprecated. Use the URemoveOtherGameplayEffectComponent instead. | |
| FGameplayEffectQuery | RemoveGameplayEffectQuery | Remove Gameplay Effect Query is deprecated. Use the URemoveOtherGameplayEffectComponent instead. | |
| FInheritedTagContainer | RemoveGameplayEffectsWithTags | Remove Gameplay Effects With Tags is deprecated. Use the UTargetTagRequirementsGameplayEffectComponent instead. | |
| TArray< TSubclassOf< UGameplayEffect > > | RoutineExpirationEffectClasses | Routine Expiration Effect Classes is deprecated. Use the UAdditionalEffectsGameplayEffectComponent instead. | |
| TObjectPtr< class UGameplayEffectUIData > | UIData | UI Data is deprecated. UGameplayEffectUIData now dervies from UGameplayEffectComponent, add it as a GameplayEffectComponent. You can then access it with FindComponent |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| void | GetOwnedGameplayTags
(
FGameplayTagContainer& TagContainer |
The implementation and method name did not match. Use GetGrantedTags() to get the tags Granted to the Actor this GameplayEffect is applied to. | |
| bool | HasAllMatchingGameplayTags
(
const FGameplayTagContainer& TagContainer |
The implementation and method name did not match. Use GetGrantedTags().HasAll() to check against the tags this GameplayEffect will Grant to the Actor. | |
| bool | HasAnyMatchingGameplayTags
(
const FGameplayTagContainer& TagContainer |
The implementation and method name did not match. Use GetGrantedTags().HasAny() to check against the tags this GameplayEffect will Grant to the Actor. | |
| bool | HasMatchingGameplayTag
(
FGameplayTag TagToCheck |
The implementation and method name did not match. Use GetGrantedTags().HasTag() to check against the tags this GameplayEffect will Grant to the Actor. | |
| void | This was never implemented. The proper way to do this now is to use IsDataValid |