Navigation
API > API/Plugins > API/Plugins/GameplayAbilities > API/Plugins/GameplayAbilities/UAbilitySystemComponent
Description
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 abilities Grants an Ability. This will be ignored if the actor is not authoritative. Returns handle that can be used in TryActivateAbility, etc.
| Name | GiveAbility |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/AbilitySystemComponent.h |
| Include Path | #include "AbilitySystemComponent.h" |
| Source | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/AbilitySystemComponent_Abilities.cpp |
FGameplayAbilitySpecHandle GiveAbility
(
const FGameplayAbilitySpec & AbilitySpec
)
Parameters
| Name | Remarks |
|---|---|
| AbilitySpec | FGameplayAbilitySpec containing information about the ability class, level and input ID to bind it to. |