Files
PHY/Plugins/GCS/Source/GenericGameplayAbilities/Private/GameplayActors/GGA_CharacterWithAbilities.cpp
2026-03-03 01:23:02 +08:00

22 lines
690 B
C++

// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
#include "GameplayActors/GGA_CharacterWithAbilities.h"
#include "GGA_AbilitySystemComponent.h"
AGGA_CharacterWithAbilities::AGGA_CharacterWithAbilities(const FObjectInitializer& ObjectInitializer): Super(ObjectInitializer)
{
AbilitySystemComponent = CreateDefaultSubobject<UGGA_AbilitySystemComponent>(TEXT("AbilitySystemComponent"));
AbilitySystemComponent->SetIsReplicated(true);
}
UAbilitySystemComponent* AGGA_CharacterWithAbilities::GetAbilitySystemComponent() const
{
if (UAbilitySystemComponent* BpProvidedASC = CustomGetAbilitySystemComponent())
{
return BpProvidedASC;
}
return AbilitySystemComponent;
}