iiceman Posted March 1, 2015 Share Posted March 1, 2015 Hey there folks, I am still playing around with my very simple mesh editor and I got to a point where I want to save the scene that I have created and later on load it again. I thought I can use the SceneSerializer (found here: http://www.html5gamedevs.com/topic/6039-exporting-a-babylon-scene-to-a-file/) and stringify my scene and then use the SceneLoader to load it again (because thats the only way I could think of to get my scene back) from that string. I ended up with an error that tells me I have no camera defined when reloading the saved scene. So I check and it seems to be true: after serializing the scene there is no camera.var serializedScene = BABYLON.SceneSerializer.Serialize(scene);var strScene = JSON.stringify(serializedScene);console.log(scene.cameras, serializedScene.cameras);The console shows a camera for scene.cameras but serializedScene.cameras is just an empty array. Am I doing something wrong here or is it just not how I am supposed to do it? Here is the current version of the editor: http://localhost/babylondev/mapEditor/ Edit: http://p215008.mittwaldserver.info/mapEditor/ (load and save buttons are in the file menu at the top) By the way: right mouse button to select a mesh. Hope you guys can help me out once again here jerome 1 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.