2021-04-23 11:01:15 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#include "SubobjectDataBlueprintFunctionLibrary.h"
|
|
|
|
|
|
2022-08-24 22:45:13 -04:00
|
|
|
#include "Templates/SharedPointer.h"
|
|
|
|
|
|
2021-04-23 11:01:15 -04:00
|
|
|
void USubobjectDataBlueprintFunctionLibrary::GetData(const FSubobjectDataHandle& DataHandle, FSubobjectData& OutData)
|
|
|
|
|
{
|
2023-11-28 15:19:59 -05:00
|
|
|
// Copy the underlying subobject data - probably to the stack so that script can manipulate it
|
2021-04-23 11:01:15 -04:00
|
|
|
TSharedPtr<FSubobjectData> DataPtr = DataHandle.GetSharedDataPtr();
|
|
|
|
|
if(DataPtr.IsValid())
|
|
|
|
|
{
|
|
|
|
|
OutData = *DataPtr.Get();
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-11-28 15:19:59 -05:00
|
|
|
|
|
|
|
|
const UObject* USubobjectDataBlueprintFunctionLibrary::GetObjectForBlueprint(const FSubobjectData& Data, UBlueprint* Blueprint)
|
|
|
|
|
{
|
|
|
|
|
return Data.GetObjectForBlueprint(Blueprint);
|
|
|
|
|
}
|