.h:
UFUNCTION(BlueprintCallable, CustomThunk, meta = (CustomStructureParam = "StructData"))
FString ConvertStructToString(const int32& StructData);
DECLARE_FUNCTION(execConvertStructToString);
.cpp:
FString UTestComponent::ConvertStructToString(const int32& StructData)
{
checkNoEntry();
return FString();
}
DEFINE_FUNCTION(UTestComponent::execConvertStructToString)
{
Stack.MostRecentPropertyAddress = nullptr;
Stack.StepCompiledIn<FStructProperty>(nullptr);
void* StructPtr = Stack.MostRecentPropertyAddress;
FStructProperty* StructProperty = CastField<FStructProperty>(Stack.MostRecentProperty);
P_FINISH
if (ensure((StructProperty != nullptr) && (StructProperty->Struct != nullptr) && (StructPtr != nullptr)))
{
FString OutString;
FJsonObjectConverter::UStructToJsonObjectString(StructProperty->Struct, StructPtr, OutString);
*static_cast<FString*>(Z_Param__Result) = OutString;
}
}