RuntimeError when loading Babylon Editor scene with animated Mixamo GLB

Hi everyone,

I’m having an issue with a Babylon.js Editor project and I’m not sure what is causing it.

I have a simple test project with the default cube scene. I imported an animated GLB model from Mixamo into the scene. The model works correctly inside the Babylon.js Editor: I can see it and its animations play correctly.

However, when I run the generated project on my local server, the scene fails to load.

This is the error I get in the browser console:

Uncaught (in promise) RuntimeError: Unable to load from ./scene/example.babylon: loadAssets of unknown
    Lights:
        Name: sun, type: Directional
    Materials:
        Name: sky
        Name: material_0.001
        Name: box
    Skeletons:
        Name: Armature, nBones: 33, nAnimationRanges: 0
    at f (index-EMiRzh9t.js:57:19072)
    at wg (index-EMiRzh9t.js:79:3109)
    at Object.load (index-EMiRzh9t.js:90:288)
    at index-EMiRzh9t.js:57:19326
    at p (index-EMiRzh9t.js:57:17367)
    at index-EMiRzh9t.js:2:22860
    at XMLHttpRequest.d (index-EMiRzh9t.js:2:24083)

The test scene contains only the default cube and the animated Mixamo GLB model.

If I remove the Mixamo model, the scene loads correctly. The problem appears when the animated GLB is included.

The model has a skeleton named Armature with 33 bones. The animations play correctly inside Babylon.js Editor.

I’m using Babylon.js Editor with Babylon.js 9.12.1.

Has anyone encountered this loadAssets of unknown error when exporting/loading a scene containing an animated GLB with a Mixamo skeleton?

Is there something specific I need to do with the skeleton, animation groups, or the imported GLB before generating the .babylon scene?

Any help would be greatly appreciated.

Thanks!

Update: I performed several additional tests. The problem is not related to Mixamo, skeletons, animations, or a specific model. I also tested an external GLB without animations, and another unrelated GLB model, and both produce the same error.

A scene containing only objects created directly in Babylon Editor (for example cubes) works correctly. As soon as I import an external 3D model and generate the .babylon scene with Cmd + G, the generated scene fails to load with loadAssets of unknown.

The imported models display correctly inside Babylon Editor before generating the scene.

cc @julien-moreau

Hey @Maxi !

I already got this error multiple times due to lack of imports.
There is a good documentation for it here: Babylon.js docs

Try to simply add import "@babylonjs/core"; in your code to confirm that’s the problem. This will import the entire Babylon.js lib and, if you want to optimize the build size, you’ll have to import all elements that you’ll use at runtime individually (ShadowGenerator, PointLight, DirectionalLight, UniversalCamera, GroundMesh, etc.).

Thanks for reporting, I need to document it for sure.
But let’s see if it’s the cause

Thanks a lot! That was exactly the problem. I added import "@babylonjs/core"; to my app.ts, and everything works perfectly now, including the GLB models.

I’m still new to Babylon.js, so I’m not always sure which individual imports are needed for 3D models and their materials to work correctly. I think I’ll probably keep importing the full Babylon.js library for now, since otherwise I might run into similar issues later when using different models or features.

Thanks again for pointing me in the right direction!