I found the answer –
Set your UPROPERTY’s you want to copy from another class’s CDO as (Transient). This way, they don’t get serialized. Overwrite the ::Serialize(FArchive& Ar) UObject virtual function and set your Transient properties here.
void APickup::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);
if (Item.Get())
{
UStorableItem* CDO = Item.GetDefaultObject();
StaticMesh->SetStaticMesh(CDO->GetStaticMesh());
}
}
Where StaticMesh is a Transient UStaticMeshComponent. Item is a TSubclassOf. Make sure you do this after you Super:: so that your TSubclassOf is updated before copying data from it’s CDO. This is the best solution I could find.