Hey Martin,
the code that is intended to fix up the RowStruct class is happening in UDataTable::PostLoad():
if (!RowStructName_DEPRECATED.IsNone()) { UStruct* SavedRowStruct = RowStruct; if (!SavedRowStruct) { SavedRowStruct = FindFirstObjectSafe<UStruct>(*RowStructName_DEPRECATED.ToString()); } if (SavedRowStruct) { RowStructPathName = SavedRowStruct->GetStructPathName(); } else { UE_LOG(LogDataTable, Error, TEXT("Unable to resolved RowStruct PathName from serialized short name '%s'!"), *RowStructName_DEPRECATED.ToString()); } }
So the current implementation is expecting PostLoad to be called after serialization, which happens if you load an asset in UE, but not if you manually serialize it like you’re doing.
You could try calling PostLoad() manually, but loading is quite intricate, so there’s a chance this will surface other issues.
Otherwise if your current solution works, feel free to stick to it.
Kind Regards,
Sebastian