UAbilitySystemGlobals::GetAbilitySystemComponentFromActor

Searches the passed in actor for an ability system component, will use [IAbilitySystemInterface](API\Plugins\GameplayAbilities\IAbilitySystemInterface) or fall back to a component search

Choose your operating system:

Windows

macOS

Linux

References

Module

GameplayAbilities

Header

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/AbilitySystemGlobals.h

Include

#include "AbilitySystemGlobals.h"

Source

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/AbilitySystemGlobals.cpp

Syntax

static UAbilitySystemComponent * GetAbilitySystemComponentFromActor
(
    const AActor * Actor,
    bool LookForComponent
)

Remarks

Searches the passed in actor for an ability system component, will use IAbilitySystemInterface or fall back to a component search

Helping function to avoid having to manually cast