Browse Source

allow default loadPrefab so references are working

Nicolas Cannasse 5 years ago
parent
commit
7715a98c6e
2 changed files with 2 additions and 1 deletions
  1. 1 0
      hide.hxml
  2. 1 1
      hrt/prefab/ContextShared.hx

+ 1 - 0
hide.hxml

@@ -1,4 +1,5 @@
 common.hxml
 common.hxml
+-D hide
 -js bin/hide.js
 -js bin/hide.js
 -main hide.Ide
 -main hide.Ide
 --macro include("h3d.shader")
 --macro include("h3d.shader")

+ 1 - 1
hrt/prefab/ContextShared.hx

@@ -69,7 +69,7 @@ class ContextShared {
 	}
 	}
 
 
 	public function loadPrefab( path : String ) : Prefab {
 	public function loadPrefab( path : String ) : Prefab {
-		throw "Not implemented";
+		return hxd.res.Loader.currentInstance.load(path).toPrefab().load();
 	}
 	}
 
 
 	public function loadShader( path : String ) : ShaderDef {
 	public function loadShader( path : String ) : ShaderDef {