When creating an AdvancedDynamicTexture for Mesh, the mesh becomes invisible

Hi All,
I have been creating a GUI and attached it to a mesh with BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh,
The problem is that the mesh texture becomes invisible and only the GUI is shown on it.

Can i keep the mesh material and add the GUI to it ?

You can use mesh.clone()-function, to clone and distribute the materials:

Thanks for the suggested help,
Since I’m using a follow camera behavior on the original mesh and due to performance considerations, I prefer not to create additional meshes in the scene if I don’t have to.

Is it the only acceptable way not to loose the original mesh appearance?

It is possible to use it as any other texture (i.e. emissiveTexture for StandardMaterial), like this:

3 Likes

Thanks @Takemura , looks like the correct path