2
0
Эх сурвалжийг харах

added partial load to loadPrefab

Nicolas Cannasse 4 жил өмнө
parent
commit
6bd5ea4923

+ 3 - 2
h3d/prim/ModelCache.hx

@@ -121,8 +121,9 @@ class ModelCache {
 
 	#if hide
 
-	public function loadPrefab( res : hxd.res.Prefab, ?parent : h3d.scene.Object ) {
-		var p = res.load();
+	public function loadPrefab( res : hxd.res.Prefab, ?p : hrt.prefab.Prefab, ?parent : h3d.scene.Object ) {
+		if( p == null )
+			p = res.load();
 		var ctx = new hrt.prefab.Context();
 		ctx.init(res);
 		@:privateAccess ctx.shared.cache = this;