소스 검색

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);
 	}