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

17 lines
374 B
C
Raw Normal View History

2024-04-21 15:56:57 -07:00
#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;
}
}