When you serialize an object and then this serialized object is reloaded, the material is lost.
In the inspector in “Active Material”, the material has become Default Material
On my project, I save in a file the mesh modified via the inspector. But when this file is reloaded, the mesh is transparent, more textures, more material.
This is expected as the SerializeMesh function will only serialize the mesh
To serialize the mesh and all it needs to render you need to serialize the scene (BABYLON.SceneSerializer.Serialize(scene))
I don’t want to serialize the whole scene, just the meshes independently.
I rebuild the files of meshes modified by the inspector. Serializing the scene will create a file for me with all the meshes, camera lights… I wouldn’t want to do that.
It worked like this before. Is this a change? Why the material could not be serialized too. I do not understand.