瀏覽代碼

added toPrefab #if hide

ncannasse 7 年之前
父節點
當前提交
fc09a2b015
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      hxd/res/Any.hx

+ 6 - 0
hxd/res/Any.hx

@@ -51,6 +51,12 @@ class Any extends Resource {
 		return loader.loadCache(entry.path, hxd.res.Sound);
 	}
 
+	#if hide
+	public function toPrefab() {
+		return loader.loadCache(entry.path, hide.prefab.Resource);
+	}
+	#end
+
 	public function to<T:hxd.res.Resource>( c : Class<T> ) : T {
 		return loader.loadCache(entry.path, c);
 	}