Combining meshes and merging edges dynamically

Hey,

Does anyone know if it’s possible to combine meshes and also merge edges and vertices that overlap in realtime?

I am designing a game that will dynamically instantiate meshes that will then need to be merged together so there are no visual hard seams. I’ve attached a screenshot showing 2 meshes with a visible seam, and then a mesh on the left that has been pre-merged and looks the way I want it to.

Any idea how to do this in code and/or with an asset?

Thanks,
Mac

Some tools on the asset store like probuilder would have vertex merging functionality built in , not sure if they support custom shapes… go have a look and see.

Otherwise its all possible to do yourself but there is no quick solution if that is what you are after, not that I know of at least. Merging edges requires rebuilding the vertex , triangles and uv array of a mesh. The code to build dynamic geometry is not difficult but it has no logic of shapes and you would have to create your own logic that manages shape merging combinations to rebuild the new mesh accordingly.