Files
UnrealEngineUWP/Engine/Source/Editor/SubobjectDataInterface/Private/SubobjectDataBlueprintFunctionLibrary.cpp
dan oconnor 31c63dde53 Flatten FSubobjectData hierarchy to prevent slicing, the occurence of slicing necessitated removal of subtypes and associated machinery. They were not supportable.
#rb ben.hoffman, Phillip.Kavan
#jira UE-201295, FORT-686637

[CL 29968056 by dan oconnor in ue5-main branch]
2023-11-28 15:19:59 -05:00

21 lines
668 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "SubobjectDataBlueprintFunctionLibrary.h"
#include "Templates/SharedPointer.h"
void USubobjectDataBlueprintFunctionLibrary::GetData(const FSubobjectDataHandle& DataHandle, FSubobjectData& OutData)
{
// Copy the underlying subobject data - probably to the stack so that script can manipulate it
TSharedPtr<FSubobjectData> DataPtr = DataHandle.GetSharedDataPtr();
if(DataPtr.IsValid())
{
OutData = *DataPtr.Get();
}
}
const UObject* USubobjectDataBlueprintFunctionLibrary::GetObjectForBlueprint(const FSubobjectData& Data, UBlueprint* Blueprint)
{
return Data.GetObjectForBlueprint(Blueprint);
}