LoadAssets of Unknown Materials

Hi guys,
I meet a question about the SceneLoader.I export gltf 2.0 from Unity, and when I try to load it, it throws an error. I try to import ‘import {GLTFFileLoader} from “@babylonjs/loaders/glTF”’, it also didn’t work.
This file can be openned in sandbox model view.
Looking forward to your answers!!!

I sol it!!! different version between core and loader!!! my mistake

3 Likes

Oh yes this one will totally break it

1 Like

any update?
I hit RuntimeError: Unable to load from XXX.gltf: Unsupported version: 2.0
@babylonjs/core and loaders all 6.27.1

Are you able to open your file in Sandbox?

yes, sandbox can open it

Do you have the same error with any other GLTF/GLB files?

i think so, i check the code :
export declare class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
/** @internal /
static _CreateGLTF1Loader: (parent: GLTFFileLoader) => IGLTFLoader;
/
* @internal */
static _CreateGLTF2Loader: (parent: GLTFFileLoader) => IGLTFLoader;
but the _CreateGLTF2Loader is undefined.
looks like should import some file to patch this static method…

The error which you’ve got comes from here - https://github.com/search?q=repo%3ABabylonJS%2FBabylon.js+“Unsupported+version”&type=code

Most probably, the loader cannot be created.
Check your import statements, probably you don’t import SceneLoader?

Here is the good example of all needed imports - https://github.com/RaananW/babylonjs-webpack-es6/blob/master/src/scenes/loadModelAndEnv.ts

1 Like

thanks ~
i fixed by import “@babylonjs/loaders/glTF/2.0/glTFLoader”;
by search GLTFFileLoader._CreateGLTF2Loader =
It should be document somewhere.

It is documented - Babylon.js ES6 support with Tree Shaking | Babylon.js Documentation

2 Likes