I always get an error when I use BABYLON.SceneLoader.ImportMesh(
“”,
Assets.meshes.Yeti.rootUrl,
Assets.meshes.Yeti.filename,
babylon.scene,
function (newMeshes) {
newMeshes[0].scaling = new Vector3(0.1, 0.1, 0.1);
}
); I don’t know the reason, the error content is: lBJS - [09:53:32]: Unable to load from https://assets.babylonjs.com/meshes/Yeti/MayaExport/glTF/Yeti.gltf: importMesh of unknown
I have tried Version 6.11.1 and 5.5.5
You can try running
npm i @babylonjs/assets
It does not work either when I try to load local gltf
Unable to directly read files in the static directory. You can place them in the public directory
I get the same error
Loaders needs to be imported;
import ‘@babylonjs/loaders’;
Nothing changed
You can’t mix them up
import * as BABYLON from ‘@babylonjs/core’;
import ‘@babylonjs/loaders’;
1 Like
It really works!! Thank you very very much!!
I got the import scripts from this website “babylonjs-loaders - npm”
Yes, @babylonjs/loaders and babylonjs-loaders , they are two different sets of builds
OK,I got it!Thanks for your patience!