瀏覽代碼

fix for errors in debugger

Nicolas Cannasse 5 年之前
父節點
當前提交
a082f32f6b
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      hide/comp/Scene.hx

+ 5 - 1
hide/comp/Scene.hx

@@ -436,7 +436,11 @@ class Scene extends Component implements h3d.IDrawable {
 			return hmd;
 			return hmd;
 
 
 		var relPath = StringTools.startsWith(path, ide.resourceDir) ? path.substr(ide.resourceDir.length+1) : path;
 		var relPath = StringTools.startsWith(path, ide.resourceDir) ? path.substr(ide.resourceDir.length+1) : path;
-		var e = try hxd.res.Loader.currentInstance.load(relPath) catch( e : hxd.res.NotFound ) null;
+		var e;
+		if( ide.isDebugger )
+			e = hxd.res.Loader.currentInstance.load(relPath);
+		else
+			e = try hxd.res.Loader.currentInstance.load(relPath) catch( e : hxd.res.NotFound ) null;
 		if( e == null || reload ) {
 		if( e == null || reload ) {
 			var data = sys.io.File.getBytes(fullPath);
 			var data = sys.io.File.getBytes(fullPath);
 			if( data.get(0) != 'H'.code ) {
 			if( data.get(0) != 'H'.code ) {