UGameplayAbility::K2_ActivateAbility

ActivateAbility

Choose your operating system:

Windows

macOS

Linux

References

Module

GameplayAbilities

Header

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/GameplayAbility.h

Include

#include "Abilities/GameplayAbility.h"

Syntax

UFUNCTION(BlueprintImplementableEvent, Category=Ability, DisplayName="ActivateAbility",
          Meta=(ScriptName="ActivateAbility"))
void K2_ActivateAbility()

Remarks

ActivateAbility

The main function that defines what an ability does. -Child classes will want to override this -This function graph should call CommitAbility -This function graph should call EndAbility

Latent/async actions are ok in this graph.

that Commit and EndAbility calling requirements speak to the K2_ActivateAbility graph. In C++, the call to K2_ActivateAbility() may return without CommitAbility or EndAbility having been called. But it is expected that this will only occur when latent/async actions are pending. When K2_ActivateAbility logically finishes, then we will expect Commit/End to have been called.