UAbilitySystemComponent::ApplyModToAttribute

Applies an in-place mod to the given attribute.

Windows
MacOS
Linux

References

Module

GameplayAbilities

Header

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/AbilitySystemComponent.h

Include

#include "AbilitySystemComponent.h"

Source

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/AbilitySystemComponent.cpp

Syntax

void ApplyModToAttribute
(
    const FGameplayAttribute & Attribute,
    TEnumAsByte< EGameplayModOp::Type > ModifierOp,
    float ModifierMagnitude
)

Remarks

Applies an in-place mod to the given attribute. This correctly update the attribute's aggregator, updates the attribute set property, and invokes the OnDirty callbacks.

This does not invoke Pre/PostGameplayEffectExecute calls on the attribute set. This does no tag checking, application requirements, immunity, etc. No GameplayEffectSpec is created or is applied!

This should only be used in cases where applying a real GameplayEffectSpec is too slow or not possible.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss