Explorar o código

fix for errors in debugger

Nicolas Cannasse %!s(int64=5) %!d(string=hai) anos
pai
achega
a082f32f6b
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  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 ) {