Submeshes disappear after merge meshes and markVerticesDataAsUpdatable

Hi,
I’m trying to create a merged mesh with a few individual meshes and I’d like to keep these individual meshes as submeshes of the new merged one.
It works correctly, but as soon as I set markVerticesDataAsUpdatable(BABYLON.VertexBuffer.PositionKind) to the merged mesh, the submeshes are cleared.
Here I’ve set up a simple playground:
https://playground.babylonjs.com/#D5KWS4

In the console you can see how the submeshes are removed after marking the vertices as updatable (I need to manipulate vertices positions after the merging process).

Is there any way to set the vertices as updatable without loosing the submeshes?

Thanks!

It’s a bug, it will be fixed by:

3 Likes

Thanks @Evgeni_Popov for taking a look at this and submitting the proposed fix.