The problem of “@babylonjs/core”: “^6.11.1”

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
Snipaste_2023-07-07_09-55-40

Snipaste_2023-07-07_09-56-18

Snipaste_2023-07-07_10-01-27

You can try running
npm i @babylonjs/assets

I think it’s noting to do with this package, I already add script tag in the index.html.

It does not work either when I try to load local gltf
Snipaste_2023-07-07_11-08-46

Snipaste_2023-07-07_11-10-50

Unable to directly read files in the static directory. You can place them in the public directory

I get the same error :sob: :sob:
Snipaste_2023-07-07_11-39-18

Snipaste_2023-07-07_11-39-50

Snipaste_2023-07-07_11-39-59

Loaders needs to be imported;
import ‘@babylonjs/loaders’;

Nothing changed
Snipaste_2023-07-07_14-11-43

Snipaste_2023-07-07_14-13-13

Snipaste_2023-07-07_14-13-01

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!! :+1: :+1:
I got the import scripts from this website “babylonjs-loaders - npm:triumph: :triumph:

Yes, @babylonjs/loaders and babylonjs-loaders , they are two different sets of builds

OK,I got it!Thanks for your patience! :handshake: :handshake: