Navigation
API > API/Plugins > API/Plugins/GameplayAbilities
AbilityAsync is a base class for ability-specific BlueprintAsyncActions. These are similar to ability tasks, but they can be executed from any blueprint like an actor and are not tied to a specific ability lifespan. By default these actions are only kept alive by the blueprint graph that spawns them and will eventually be destroyed if the graph instance is deleted or spawns a replacement. EndAction should be called when a one-time action has succeeded or failed, but for longer-lived actions with multiple triggers it can be called from blueprints.
| Name | UAbilityAsync |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/Async/AbilityAsync.h |
| Include Path | #include "Abilities/Async/AbilityAsync.h" |
Syntax
UCLASS (Abstract, Meta=(ExposedAsyncProxy=AsyncAction), MinimalAPI)
class UAbilityAsync : public UCancellableAsyncAction
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UBlueprintAsyncActionBase → UCancellableAsyncAction → UAbilityAsync
Derived Classes
UAbilityAsync derived class hierarchy
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AbilitySystemComponent | TWeakObjectPtr< UAbilitySystemComponent > | Abilities/Async/AbilityAsync.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void EndAction() |
Explicitly end the action, will disable any callbacks and allow action to be destroyed | Abilities/Async/AbilityAsync.h |
|
virtual UAbilitySystemComponent * GetAbilitySystemComponent() |
Returns the ability system component this action is bound to | Abilities/Async/AbilityAsync.h | |
virtual void SetAbilityActor
(
AActor* InActor |
Sets the bound component by searching actor for one | Abilities/Async/AbilityAsync.h | |
virtual void SetAbilitySystemComponent
(
UAbilitySystemComponent* InAbilitySystemComponent |
Sets the bound component | Abilities/Async/AbilityAsync.h |
Overridden from UCancellableAsyncAction
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Cancel() |
Abilities/Async/AbilityAsync.h | ||
virtual bool ShouldBroadcastDelegates() |
This should be called prior to broadcasting delegates back into the event graph, this ensures the action and ability system component are still valid | Abilities/Async/AbilityAsync.h |