UAbilitySystemComponent::GiveAbility

GameplayAbilities

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_Abilities.cpp

Syntax

FGameplayAbilitySpecHandle GiveAbility
(
    const FGameplayAbilitySpec & AbilitySpec
)

Remarks

GameplayAbilities

The role of the AbilitySystemComponent with respect to Abilities is to provide: -Management of ability instances (whether per actor or per execution instance). -Someone has to keep track of these instances. -Non instanced abilities could be executed without any ability stuff in AbilitySystemComponent. They should be able to operate on an GameplayAbilityActorInfo + GameplayAbility.

As convenience it may provide some other features: -Some basic input binding (whether instanced or non instanced abilities). -Concepts like "this component has these abilitiesGrants Ability. Returns handle that can be used in TryActivateAbility, etc.

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