Jump to content

How to save & import project?


Limes2018
 Share

Recommended Posts

Hi all,

I try to BJS editor for a new comer but have a simple question. How do I save & import project?

I checked the following document, but can't save and import.

https://doc.babylonjs.com/resources/loading_saving

[Save]

For example,  I opened the editor and import a sword mesh(bjs3.jpg). Next, I saved a scene with "Project/ Export Templete" (bjs4.jpg)

The operation is true for saving project?

[Import]

For example, I opened the project with "Project/ Import Project". Click "No" on "Append to existing one?".  Then, I selected the all scene files (bjs5.jpg).

But scene did not change and keep showing "Loading scene" logo.

I opened the editor with online and operate the same. I got the following log with chrome developer tool.

What should I do for import project? In this case, I'd like to open the default scene including the sword mesh I added by myself.

 

Uncaught (in promise) TypeError: Cannot read property 'forEach' of undefined
    at Function.eval (editor.js:1)
    at step (editor.js:1)
    at Object.eval [as next] (editor.js:1)
    at eval (editor.js:1)
    at new Promise (<anonymous>)
    at __awaiter (editor.js:1)
    at Function.ProjectImporter.Import (editor.js:1)
    at Editor.eval (editor.js:1)
    at step (editor.js:1)
    at Object.eval [as next] (editor.js:1)

 

My BJS editor version is v2.3.5

Thanks for your kindness. 

bjs3.jpg

bjs4.jpg

bjs5.jpg

Link to comment
Share on other sites

Hey @Limes2018! I recommend that you read this quick article for saving/loading your projects: https://doc.babylonjs.com/resources/loading_saving
In fact, the "Export Template..." button is the final step for your project in the editor, like you would export your final Unity3D project. The template will include all final scene assets: textures, sounds, scene, metadatas, etc. but also a project structure for you to compile/test your custom code that you'll write using your beloved IDE (Visual Studio Code, etc.)

I suggest that you always save your project (the .editorproject) using "Save Project..." in the same directory as your scene file, textures, etc. This folder will be your design/artist project that you'll, in future, export for developers (using "Export Template...").
To reload your project, just drag'n'drop ALL your files including the .editorproject in the editor.

Is that clear? If not, I can create a feature video to explain more the philosophy of the editor :)

Link to comment
Share on other sites

@Luaacro

Thanks again for your kindly answer. I finally understood I need to gather all files at the same folder.
I misunderstood every files at different place can be recognized or copied because Unity copies all files in Unity's project folder.

But I have new two questions when the following operation.

Gathered all files at the same folder and made a scene (bjs6.jpg).
Clicked "Save Project" and got "scene.editorproject".
Restarted the editor and dragged & drop all the files (bjs7.jpg).
Selected "Append to existing one ?" => No
Then it seems to works but all model objects are doubleness (bjs8.jpg).
Furtheremore, background color is not the same (bjs6.jpg vs bjs8.jpg)

I couldn't know what kind of problem for the sword model or my operation.

Any comment will helpful for me.

bjs6.jpg

bjs7.jpg

bjs8.jpg

Sting-Sword.babylon

Link to comment
Share on other sites

Unfortunately I do not reproduce :( I saved the .editorproject, restarted the editor (also tested without restarting) and drag'n'dropped the files (sword.babylon and project.editorproject) all model objects are not doubleness

I'm going to test with the Mac OS version of the editor to see if I can see any difference

Link to comment
Share on other sites

@Luaacro I installed the latest version of editor from "http://editor.babylonjs.com/BabylonJS Editor.exe"But the situation was the same.The doubleness objects have the following feature.

- position, rotation, scale is the same

- One object has material, the other doesn't. (See the picture. The screenshot is on Windows 10)

My Windows 10 version is Windows 10 Pro 1809.

I'll try for other 3D model and investigate what caused the situation.

If you find anything, I'd appreciate it.

20181118_2.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Okay finally reproduced!!

I found that the meshes are duplicated because they are in the .babylon file and the .editorproject. I guess that you used the "Import Meshes" function and saved them into the .editorproject. If you remove the duplicated meshes and save your project (.editorproject) it solves your problem :)

I'll add a tooltip in the editor to let user know if the mesh comes from the .babylon file or the .editorproject so it will be les confusing

Thanks :)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...