Navigation
API > API/Plugins > API/Plugins/GameplayAbilities > API/Plugins/GameplayAbilities/UAbilitySystemComponent
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 |
FGameplayAbilitySpecHandle GiveAbility
&40;
const FGameplayAbilitySpec & AbilitySpec
&41;
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 abilities Grants an Ability. This will be ignored if the actor is not authoritative. Returns handle that can be used in TryActivateAbility, etc.
Parameters
| Name | Description |
|---|---|
| AbilitySpec | FGameplayAbilitySpec containing information about the ability class, level and input ID to bind it to. |