Sac Posted June 12, 2017 Share Posted June 12, 2017 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; console.log(task.loadedMeshes[0].name); } assetsManager.onTaskError = function(task) { console.log("error on Loading" + task.name); } assetsManager.onFinish = function(tasks) { consloe.log("Finished"); engine.runRenderLoop(function() { scene.render(); }); }; 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 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 13, 2017 Share Posted June 13, 2017 this should work can you repro it in the repo? Also can you try with addMeshTask("model task", "", "/models/", "myModel.babylon"); ? Quote Link to comment Share on other sites More sharing options...
Sac Posted June 14, 2017 Author Share Posted June 14, 2017 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 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 14, 2017 Share Posted June 14, 2017 We have the playground here: https://www.babylonjs-playground.com/ If you can reproduce the issue there, I will be able to help you Quote Link to comment Share on other sites More sharing options...
Sac Posted June 14, 2017 Author Share Posted June 14, 2017 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. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 14, 2017 Share Posted June 14, 2017 you can still reference babylon.max.js and just use the browser debugger Here is a working example of a addMeshTask (move the camera to find the skull :)) https://www.babylonjs-playground.com/#1FKMAH#0 Quote Link to comment Share on other sites More sharing options...
Sac Posted June 15, 2017 Author Share Posted June 15, 2017 Thank you Deltakosh, I am checking it, is ring.babylon so big to load, because I have been waiting for 10 minutes to get it loaded, and still playground says "Loading Assets" Quote Link to comment Share on other sites More sharing options...
Sac Posted June 15, 2017 Author Share Posted June 15, 2017 I stand corrected, It is not loading at all.. it is still on "Loading Assets" Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 15, 2017 Share Posted June 15, 2017 PG was not working DK. ring.babylon receive a error 404 This PG works: https://www.babylonjs-playground.com/#1FKMAH#1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 15, 2017 Share Posted June 15, 2017 Lol thanks @Dad72, I was using a wrong PG! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.