浏览代码

allow default loadPrefab so references are working

Nicolas Cannasse 5 年之前
父节点
当前提交
7715a98c6e
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      hide.hxml
  2. 1 1
      hrt/prefab/ContextShared.hx

+ 1 - 0
hide.hxml

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

+ 1 - 1
hrt/prefab/ContextShared.hx

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