Replace Procedural Meshes with Static during Build

Hi,

I have a road system where each road segment is derived from ZoneShape but also creates a procedural mesh (PMC) for the road visual itself (with markings and pavements etc).

As this is only needed in the editor, I thought it would be much more efficient if I could convert the procedural into static meshes when building the standalone version. I can already convert all the PMCs into Static Mesh assets and save them in the Content folder.

I could of course replace the PMC with StaticMeshComponent at this point, but it would change my level data - which I would like to avoid. And probably would lead to someone checking in the “baked” level, which would be a no-go. Ideally the whole convert & replace should happen as part of the cooking process.

Any ideas how to achieve that?