Jump to content

Can't seem to be able to import meshes using AssetsManager


Recommended Posts

I've made a mesh in Blender and I've exported it to a .babylon file. I've also tried exporting the mesh as a .obj file but the problem persisted.
I've checked my network tab in Chrome (on Mac OS btw) and I can see that the file has been downloaded so it's not a wrong path. Also, I get errors that the system couldn't find the .manifest
file but I've found that that's not the issue.
This is the error: Unable to import meshes from ./testObject.babylon: 0

This is the code I've been using:

var loader = new BABYLON.AssetsManager(scene);
house = loader.addMeshTask("pillar", "", "./", "testObject.babylon");
house.onSuccess = function (task) {
  console.log('---> DONE', task)
  task.loadedMeshes.forEach(function (m) {
    m.position = BABYLON.Vector3.Zero();
    m.scaling = new BABYLON.Vector3(0.2, 0.2, 0.2);
house.onError = function() {
  console.log('ERROR', arguments);


Link to comment
Share on other sites

Ok, so I was hosting it on my server and checking if everything was working to put the link here, and it seems that my problem is resolved by hosting everything.
I wasn't hosting my original files since I just wanted to work on it locally.

Is there a reason why this happens? And shouldn't this be better described in the error since it doesn't really say anything and isn't very "Google-able"

Link to comment
Share on other sites

This is a security constraint from the browsers. To protect your computer you need to serve your files from a web server and not directly from the file system

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.

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.


  • Recently Browsing   0 members

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