Hi, guys I got a problem when i export editorproject, babylon and texture files from the editor, the babylon file is an empty json and got meshes in the editorproject file.
scene.babylon file:
{
"autoClear": true,
"clearColor": [
0,
0,
0,
1
],
"ambientColor": [
0,
0,
0
],
"gravity": [
0,
-9.807,
0
],
"collisionsEnabled": true,
"morphTargetManagers": [],
"lights": [],
"cameras": [],
"activeCameraID": "Editor Camera",
"animations": [],
"materials": [],
"multiMaterials": [],
"skeletons": [],
"transformNodes": [],
"geometries": {
"boxes": [],
"spheres": [],
"cylinders": [],
"toruses": [],
"grounds": [],
"planes": [],
"torusKnots": [],
"vertexData": []
},
"meshes": [],
"particleSystems": [],
"sounds": [],
"shadowGenerators": []
}
scene.editorproject file:
scene.editorproject.zip (65.0 KB)
then load these files by
// Load Scene
SceneLoader.Load(
"./scene/",
"scene.babylon",
this.engine,
(scene: Scene) => {
this.scene = scene;
// No camera?
if (!this.scene.activeCamera) {
this.scene.createDefaultCamera(false, true, true);
}
// No light?
if (!this.scene.lights.length) {
this.scene.createDefaultLight();
}
// Attach camera
this.scene.activeCamera.attachControl(this.canvas, true);
// Load extensions
Tools.LoadFile("./scene/scene.editorproject", (data: string) => {
// Apply extensions (such as custom code, custom materials etc.)
Extensions.RoolUrl = "./scene/";
Extensions.ApplyExtensions(this.scene, JSON.parse(data));
// Run render loop
this.engine.runRenderLoop(() => {
this.scene.render();
});
});
}
);
But it seems nothing has been rendered.