BabylonJS / Editor

Community managed visual editor for Babylon.js
http://editor.babylonjs.com/
813 stars 232 forks source link

Unable to load from ./scenes/_assets/../scene/scene.babylon: loadAssets of scene.babylon from Babylon.JS #403

Closed yxzyxzyxz closed 1 year ago

yxzyxzyxz commented 1 year ago

When I run, the console reports an error.

Uncaught (in promise) RuntimeError: Unable to load from ./scenes/_assets/../scene/scene.babylon: loadAssets of scene.babylon from Babylon.JS Editor version: v4.4.0, exporter version: v5.19.0
    Lights:
        Name: sun, type: Directional
    Materials:
        Name: default material
        Name: cube

image

julien-moreau commented 1 year ago

Hey @yxzyxzyxz can you ensure you have added all the needed imports in your index.ts file ? Babylon.JS uses ES6 modules and must import all the components you need. You can find more information here: https://doc.babylonjs.com/setup/frameworkPackages/es6Support

Also in order to get help from other users/developers I suggest that you use the forum: https://forum.babylonjs.com/ I'm closing this issue and if you failed to fix with the documentation I shared, feel free to open a new discussion on the forum

Thanks a lot !

strowk commented 1 year ago

I have this same issue. Could you please clarify what exactly the changes needed to be done in index.ts. To clarify, I haven't done anything in the project at all since creating it from "third person shooter" template. Maybe template contains the bug of some sort?

I made also entry in forum - https://forum.babylonjs.com/t/unable-to-load-from-scenes-assets-scene-scene-babylon/38333/1

Please do not answer me with links to documentation, I'm pretty sure that template is supposed to work right away without additional actions

strowk commented 1 year ago

Also tried adding


import {
    SkyMaterial
} from '@babylonjs/materials';

, as I think the documentation suggests to do, but this had no effect on the result unfortunately. Template seems broken and it is not clear how to fix it.

strowk commented 1 year ago

Aha, so workarond is to remove the sky in Assets over here:

image

Now there is no sky, but also it is not just black screen:

image

Why exactly this is broken like this is unclear at the moment, I think some of people, who understand more about this, should look into issue. Could you please reopen this bug?