Serializing without UPROPERTY()

I’m a bit out of my wheelhouse here and was looking for advice on how to approach a solution.

I’m currently playing around with FDynamicMesh3 which I know now has serialization UPORPERTY() support via a UObject class in UE-5, but this is a UE4 plugin.

I have an actor that currently wraps an FDynamicMesh3 to do some simple mesh building operations.

While I can save the actual properties used to create the shape with UPROPERTY() and simply redraw whenever, I’ve been saving mesh operations (boolean ops) and reapplying those too, and therefore need a way to serialize an array of FDynamicMesh3 so I can reapply the boolean operations in sequence.

This works really well for the initial lifetime of the object, but once the editor closes all the FDynamicMesh3’s get cleared because there in no default serialization for it.

TLDR: How does one go about serializing a struct that isn’t a UCLASS or USTRUCT?

If I close the editor and reopen how do I ensure that all the data that was in the FDynamicMesh3 stays there?

I was able to achieve this in a really really hacky way.

I made a proxy USTRUCT() to hold the data as UPROPERTY() - enough to rebuild a FDynamicMesh3. And then use an FMeshShapeGenerator subclass to recreate the FDynamicMesh3 from said generator. This is the only work around I could find as FDynamicMesh3 has within it too many data types with private memebers that arn’t setup for serialization in UE4 and for my project I can’t really modify the engine because it’s a plugin.