Jump to content

scene.meshes empty after import + how to refresh in browser


AllForum
 Share

Recommended Posts

Hello,

 

Again a beginner (js +babylon) question...

 

1- After importing a scene from a file with BABYLON.SceneLoader.ImportMesh I want to do a for loop to manage my meshes (adding action, checking tags, etc). But scene.meshes is sometimes/often (!) empty. And the scene is well drawn.

When can I access to the scene mesh array ? Is there a sample somewhere ?

 

2- To learn I modify a lot my html file and my test.babylon file (I change the content of the file to switch between a basic file and a more complex one). But the browser does not always update properly. I tried shift+F5 in the browser or restart my local IIS server.

What is the correct way to refresh after modifying the html file or the geometry file ?

 

Thanks for advices.

 

Link to comment
Share on other sites

Hi, 

 

1. You should check the imported meshes in the callback function of ImportMesh, and only here. Maybe you are using not it correctly : is it possible to look at your code ?

 

2. Try to use CTRL-F5. In the dev console, it should be a option 'do not take into account cache when dev console is open'. 

If your babylon file is using a manifest file, try to remove it to avoid the save in local storage.

 

Cheers, 

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...