Prechádzať zdrojové kódy

fix for errors in debugger

Nicolas Cannasse 5 rokov pred
rodič
commit
a082f32f6b
1 zmenil súbory, kde vykonal 5 pridanie a 1 odobranie
  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;
 
 		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 ) {
 			var data = sys.io.File.getBytes(fullPath);
 			if( data.get(0) != 'H'.code ) {