[Plugin] static mesh replacement destroys foilage

Hello everyone,

I wrote a C++ plugin which takes all static mesh actors placed in specified folder, group them by mesh / materials and then converts them into UHierarchicalInstancedStaticMeshComponent of new Actors.

Everything works great, but unfortunately this operation destroys foilage which was carefully hand-placed there.

We’ve noticed that the foilage is somehow tied to the static mesh actor below, so I was wondering if there is any way how to preserve it?

Thanks a lot for any help!
Jan