Sfoglia il codice sorgente

Fixed ContextShared api for prefab2

Valden 1 anno fa
parent
commit
13b3a96997
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      h3d/prim/ModelCache.hx
  2. 1 1
      hxd/fmt/hmd/Library.hx

+ 1 - 1
h3d/prim/ModelCache.hx

@@ -181,7 +181,7 @@ class ModelCache {
 		} else {
 			local3d = new h3d.scene.Object();
 		}
-		var sh = new hrt.prefab.ContextShared(res, p?.findFirstLocal2d(), local3d);
+		var sh = new hrt.prefab.ContextShared(res.entry.path, p?.findFirstLocal2d(), local3d);
 		var ctx2 = p.make(sh);
 		if( parent != null ) {
 			// only return object if a single child was added

+ 1 - 1
hxd/fmt/hmd/Library.hx

@@ -20,7 +20,7 @@ private class ContextShared extends hrt.prefab.ContextShared {
 
 	public function new(loadTexture : String -> h3d.mat.Texture, ?res : hxd.res.Resource, ?root2d: h2d.Object = null, ?root3d: h3d.scene.Object = null) {
 		#if prefab2
-		super(res, root2d, root3d);
+		super(res.entry.path, root2d, root3d);
 		#else
 		super(res);
 		#end