GASATHON/Project/Source/Gasa/AbilitySystem/GasaAbilitySystemComponent_Inlines.h

17 lines
374 B
C++

#pragma once
#include "GasaAbilitySystemComponent.h"
#include "AbilitySystemInterface.h"
namespace Gasa
{
inline
UGasaAbilitySystemComp* GetAbilitySystem(UObject* Object)
{
if (Object->Implements<UAbilitySystemInterface>())
{
return Cast<UGasaAbilitySystemComp>( Cast<IAbilitySystemInterface>(Object)->GetAbilitySystemComponent() );
}
return nullptr;
}
}