I try to compile the following code, but it throws the following error:
‘StaticStruct’: is not a member of ‘UStruct’.
I know that if I create an USTRUCT() in the header then it would work, but I hope there is a way to allow me to pass the struct as parameter, because I would like to make the structs as blueprints.
UStruct* UPacket::GetData(UStruct* dataStruct)
{
FJsonObjectConverter::JsonObjectStringToUStruct(this->data, dataStruct, 0, 0);
return dataStruct;
}