Files
UnrealEngineUWP/Engine/Source/Editor/SubobjectDataInterface/Private/ChildActorSubobjectData.cpp
bryan sefcik 8cc129f2b6 IWYU Pass 1 - Engine/Source/Editor/...
#jira
#preflight 6306736ac85b7fef22be7751

[CL 21558583 by bryan sefcik in ue5-main branch]
2022-08-24 22:45:13 -04:00

35 lines
916 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "ChildActorSubobjectData.h"
#include "GameFramework/Actor.h"
#include "UObject/Class.h"
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;
}