Creating static mesh from procedural mesh with different material instances on each section

Hi,

I’m creating a tile based game where I’m using a BP with a procedural mesh to create the floor then using another blueprint to grab the information of the tiles, merge them all into one larger procedural mesh with each tile being made into its own section of the same mesh, then convert that procedural mesh into a static mesh

Everything copies over as intended apart from the materials, they are stored as a dynamic material instance which is created in the construction script of the tile BP.

When the large procedural mesh is created, the material instances are applied to it in the correct element slots as you’d want, but you can’t save the map, when you try to save an error comes up and says the reference for the material instance is on another map (which it isn’t) and ends up failing to save it

Image of the error message

I’m pretty sure the issue is the dynamic material isntances, but I’m not sure how to fix

TLDR - Trying to create a static mesh from a procedural mesh which has different sections with different dynamic materials instances, not sure how to carry the information over when creating the static mesh

On the off chance someone has the same issue as me in the future -
I solved my problem by creating a blueprint for the merged static mesh, so when I create the static mesh I also pass over the data for the dynamic material instances, then they’re able to be created in the construction script of the new blueprint
Also, I have no idea what the deal is with the error message