Jump to content

Asset Manager Problem


Recommended Posts

Hi All,

I tried to load my babylon file using Asset Manager,

 var assetsManager = new BABYLON.AssetsManager(scene);
  var meshTask = assetsManager.addMeshTask("model task", "", "models/", "myModel.babylon");
  meshTask.onSucess = function(task) {
                    task.loadedMeshes[0].position = new BABYLON.Vector3(0, 0, 0);
                    engine.loadingUIText = "Loaded asset " + task.loadedMeshes[0].name;

  assetsManager.onTaskError = function(task) {
                    console.log("error on Loading" + task.name);

     assetsManager.onFinish = function(tasks) {

                    engine.runRenderLoop(function() {

I keep getting error message "Error on Loading" with the task name.

While I tried to load it using ImportMesh, and Append, Both loads the file without a problem,  Any reason why AssetManager is giving me this error ?

Also, how will I find more details abut this error ?


Looking forward for answers :)

Link to comment
Share on other sites

Hi Deltakosh,

Thank you very much for replying.

I didn't understand this ?

3 hours ago, Deltakosh said:

can you repro it in the repo?

and when i tried addMeshTask("model task", "", "/models/", "myModel.babylon");

Error: Error status: 0 - Unable to load /models/"myModel.babylon

at h/e.onreadystatechange

Link to comment
Share on other sites

Just now, Deltakosh said:

We have the playground here: https://www.babylonjs-playground.com/


If you can reproduce the issue there, I will be able to help you

Ahh, I cant use that file, as it is another company's model (for now I'm using Sceneloader's append to load that file. Let me try and find another file to check in the asset loading and see..

Meanwhile, Is there any other way to get more information about the error ? so I can understand more about it.

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