Browse Source

fix reload not taking conversion params into account

trethaller 4 years ago
parent
commit
3707c911b7
1 changed files with 3 additions and 1 deletions
  1. 3 1
      hide/comp/Scene.hx

+ 3 - 1
hide/comp/Scene.hx

@@ -375,11 +375,13 @@ class Scene extends Component implements h3d.IDrawable {
 
 		var relPath = StringTools.startsWith(path, ide.resourceDir) ? path.substr(ide.resourceDir.length+1) : path;
 		var e;
+		if( reload )
+			@:privateAccess hxd.res.Loader.currentInstance.cache.remove(path);
 		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 ) {
 			var data = sys.io.File.getBytes(fullPath);
 			if( data.get(0) != 'H'.code ) {
 				var hmdOut = new hxd.fmt.fbx.HMDOut(fullPath);