Problem with instance visibility

The instance of the gltf model is not visible. If you clone it, you can see. I deleted the parent as it is written in the documentation. Set visibility to true. There are no manipulations with materials in the code. Also disabled performance priority. Any idea what else I can try?

What did you export with? Are you sure in your 3D software the mesh does not have its enabled and visible flags set to false? Are you sure your normals are flipped the right direction? Also, when are you instancing, in the 3D software or through assetManager after the model is loaded?

When loading using assetManager, if you run through all your mesh hierarchy and set everything manually to setEnabled = true does that do the trick? Something like this (not tested) will loop through all submeshes and force them enabled, one step more you can set them all visible as well.

var assetManager = new AssetsManager(scene);
var task = assetManager.addMeshTask(meshName, "", meshPath, meshFName);
        task.onSuccess = function(t: MeshAssetTask) {
            t.loadedMeshes.forEach((mesh) => {
                mesh.setEnabled(true);
            })
        };
        task.onError = function(task:any, message:any, exception:any){
            console.error(message);
        }  

I use models from the internet and assetManager. Here is the code to create instance

Blockquote
function addMesh(name){
var m1=loadedMeshes[name];
if(m1==null){
alert(“mesh “+name+” not exists”);
return ;
}
m1.setEnabled(true);
var m2=m1.createInstance(“m”+Math.random());
m2.setParent(m1.parent);
m2.isVisible=true;
return m2;
}
Blockquote

“setEnabled” don’t works too

Are you able to setup a reproduction in the Playground?