2021-04-23 11:01:15 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#include "ChildActorSubobjectData.h"
|
|
|
|
|
|
2022-08-24 22:45:13 -04:00
|
|
|
#include "GameFramework/Actor.h"
|
|
|
|
|
#include "UObject/Class.h"
|
|
|
|
|
|
2021-04-23 11:01:15 -04:00
|
|
|
FChildActorSubobjectData::FChildActorSubobjectData(UObject* ContextObject, const FSubobjectDataHandle& ParentHandle, const bool InbIsInheritedSCS)
|
|
|
|
|
: FInheritedSubobjectData(ContextObject, ParentHandle, InbIsInheritedSCS)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FText FChildActorSubobjectData::GetDisplayName() const
|
|
|
|
|
{
|
|
|
|
|
if(const UChildActorComponent* CAC = GetChildActorComponent())
|
|
|
|
|
{
|
|
|
|
|
return CAC->GetClass()->GetDisplayNameText();
|
|
|
|
|
}
|
|
|
|
|
return FInheritedSubobjectData::GetDisplayName();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FText FChildActorSubobjectData::GetActorDisplayText() const
|
|
|
|
|
{
|
|
|
|
|
if (const AActor* ChildActor = GetObject<AActor>())
|
|
|
|
|
{
|
|
|
|
|
return ChildActor->GetClass()->GetDisplayNameText();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return FInheritedSubobjectData::GetActorDisplayText();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool FChildActorSubobjectData::IsChildActor() const
|
|
|
|
|
{
|
|
|
|
|
return true;
|
2021-06-24 10:55:53 -04:00
|
|
|
}
|