Skip to content

Commit

Permalink
Model: add file path in error log when model can't be loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoVgr committed Jan 2, 2025
1 parent a194953 commit ed9d678
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hrt/prefab/Model.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ class Model extends Object3D {
#if editor
try {
#end
var obj = shared.loadModel(source);
var obj : h3d.scene.Object;
try {
obj = shared.loadModel(source);
} catch(e : hxd.res.NotFound) {
throw 'Could not load model $source needed in ${shared.currentPath} \n\n ${e}';
}

if(obj.defaultTransform != null && children.length > 0) {
obj.name = "root";
var root = new h3d.scene.Object();
Expand Down

0 comments on commit ed9d678

Please sign in to comment.