Let me start by stating that I have thousands of meshes to import into a scene.
Since the following loop will not work because i is incremented before the callback function of ImportMesh is complete
for (var i:=0; i< max;i++)
{
BABYLON.SceneLoader.ImportMesh("", "products/", productBabylonName, scene, function (newMeshes) {});
newMeshes.position = new BABYLON.Vector3(x,y,z)
}
I solved the problem by creating a recursive loop. Here is my code
productLo